Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 2d4ef8d

Browse files
Merge pull request #375 from technote-space/release/next-v4.1.1
release: v4.1.2
2 parents ff47945 + 1a2da94 commit 2d4ef8d

File tree

12 files changed

+2410
-2346
lines changed

12 files changed

+2410
-2346
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ logs
2828
!tests/bin/**/*.sh
2929
coverage/
3030
/vendor
31-
/travis-ci
31+
/ci-helper
3232
/gh-pages
3333

3434
/.coveralls.yml

assets/js/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
node_modules/
22
coverage/
3-
*.min.js
3+
*.min.js*
44
.eslintcache

assets/js/__tests__/utils/style.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* eslint-disable no-magic-numbers */
22
import { addStyleHelper, applyStyles, addStyle } from '../../src/gutenberg/utils/style';
3+
import { Helpers } from '../../src/gutenberg/wrapper';
4+
5+
jest.mock('../../src/gutenberg/wrapper');
36

47
beforeEach(() => {
58
markerAnimationParams.addedStyle = {};
@@ -85,6 +88,7 @@ describe('addStyleHelper', () => {
8588

8689
describe('applyStyles', () => {
8790
it('should setup styles', () => {
91+
jest.spyOn(Helpers, 'editorReady').mockImplementation((callback) => callback());
8892
applyStyles();
8993
applyStyles();
9094
window.document.dispatchEvent(new Event('DOMContentLoaded', {

assets/js/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "marker-animation",
3-
"version": "4.1.1",
3+
"version": "4.1.2",
44
"description": "marker animation for wordpress",
55
"main": "marker-animation.min.js",
66
"scripts": {
@@ -26,30 +26,30 @@
2626
},
2727
"license": "GPL-3.0",
2828
"devDependencies": {
29-
"@babel/core": "^7.12.9",
30-
"@babel/plugin-transform-react-jsx": "^7.12.7",
31-
"@babel/preset-env": "^7.12.7",
32-
"@technote-space/gutenberg-test-helper": "^0.1.4",
33-
"@technote-space/gutenberg-utils": "^2.3.0",
34-
"@technote-space/register-grouped-format-type": "^2.2.0",
35-
"@wordpress/components": "^11.1.3",
36-
"@wordpress/compose": "^3.22.0",
37-
"@wordpress/element": "^2.18.0",
38-
"@wordpress/rich-text": "^3.23.0",
29+
"@babel/core": "^7.13.1",
30+
"@babel/plugin-transform-react-jsx": "^7.12.17",
31+
"@babel/preset-env": "^7.13.5",
32+
"@technote-space/gutenberg-test-helper": "^0.1.11",
33+
"@technote-space/gutenberg-utils": "^2.4.0",
34+
"@technote-space/register-grouped-format-type": "^2.2.3",
35+
"@wordpress/components": "^12.0.7",
36+
"@wordpress/compose": "^3.24.4",
37+
"@wordpress/element": "^2.19.1",
38+
"@wordpress/rich-text": "^3.24.7",
3939
"babel-jest": "^26.6.3",
4040
"babel-loader": "^8.2.2",
4141
"duplicate-package-checker-webpack-plugin": "^3.0.0",
4242
"enzyme": "^3.11.0",
4343
"enzyme-to-json": "^3.6.1",
44-
"eslint": "^7.15.0",
45-
"eslint-plugin-react": "^7.21.5",
44+
"eslint": "^7.20.0",
45+
"eslint-plugin-react": "^7.22.0",
4646
"jest": "^26.6.3",
4747
"jest-extended": "^0.11.5",
4848
"jquery": "^3.5.1",
49-
"jquery.marker-animation": "^1.5.2",
50-
"lodash": "^4.17.20",
51-
"speed-measure-webpack-plugin": "^1.3.3",
52-
"webpack": "^5.10.0",
53-
"webpack-cli": "~4.2.0"
49+
"jquery.marker-animation": "^1.5.6",
50+
"lodash": "^4.17.21",
51+
"speed-measure-webpack-plugin": "^1.4.2",
52+
"webpack": "^5.24.2",
53+
"webpack-cli": "~4.5.0"
5454
}
5555
}

assets/js/src/gutenberg/utils/style.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { getDataName, parseInputValue } from './misc';
2+
import { Helpers } from '../wrapper';
3+
const { editorReady } = Helpers;
24

35
/* istanbul ignore next */
46
if (markerAnimationParams.addedStyle === undefined) {
@@ -166,7 +168,7 @@ export const applyStyles = () => {
166168
addStyle(name, value, undefined, true, true, false, markerAnimationParams.details[ 'stripe' ].detail.value);
167169
}
168170
});
169-
wp.domReady(() => {
171+
editorReady(() => {
170172
[].forEach.call(document.getElementById('editor').getElementsByClassName(markerAnimationParams.class), elem => {
171173
Object.keys(elem.dataset).forEach(key => {
172174
// eslint-disable-next-line no-magic-numbers

assets/js/yarn.lock

Lines changed: 2192 additions & 1915 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"wp-content-framework/log": "^1.0"
2222
},
2323
"require-dev": {
24+
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
25+
"phpmd/phpmd": "^2.9",
26+
"squizlabs/php_codesniffer": "^3.5",
27+
"wp-coding-standards/wpcs": "^2.3",
28+
"phpcompatibility/phpcompatibility-wp": "^2.1",
2429
"roave/security-advisories": "dev-master",
25-
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
26-
"squizlabs/php_codesniffer": "*",
27-
"wp-coding-standards/wpcs": "*",
28-
"phpmd/phpmd": "^2.8",
29-
"phpcompatibility/phpcompatibility-wp": "*",
3030
"phpunit/phpunit": "^4.8 || ^5.7 || ^7.5",
3131
"phake/phake": "^2.3 || ^3.1"
3232
},
@@ -82,26 +82,26 @@
8282
"jest:update": [
8383
"yarn --cwd assets/js cover:update"
8484
],
85-
"bin:wp-test": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./travis-ci/bin/php/wp-test.sh",
86-
"bin:wp-test-p": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ACTIVATE_POPULAR_PLUGINS=1 ./travis-ci/bin/php/wp-test.sh",
87-
"bin:phpcs": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./travis-ci/bin/php/phpcs.sh",
88-
"bin:phpmd": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./travis-ci/bin/php/phpmd.sh",
89-
"bin:js-lint": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./travis-ci/bin/js/js-lint.sh",
90-
"bin:js-test": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./travis-ci/bin/js/js-test.sh",
91-
"bin:build": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} TRAVIS_REPO_SLUG=technote-space/marker-animation TRAVIS_TAG=v1.2.3 source ./travis-ci/bin/deploy/env.sh && bash ./travis-ci/bin/deploy/create.sh",
92-
"bin:test": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} TRAVIS_REPO_SLUG=technote-space/marker-animation TRAVIS_TAG=v1.2.3 bash ./travis-ci/bin/test.sh",
93-
"bin:test-p": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} TRAVIS_REPO_SLUG=technote-space/marker-animation TRAVIS_TAG=v1.2.3 ACTIVATE_POPULAR_PLUGINS=1 bash ./travis-ci/bin/test.sh",
85+
"bin:wp-test": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./ci-helper/bin/php/wp-test.sh",
86+
"bin:wp-test-p": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ACTIVATE_POPULAR_PLUGINS=1 ./ci-helper/bin/php/wp-test.sh",
87+
"bin:phpcs": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./ci-helper/bin/php/phpcs.sh",
88+
"bin:phpmd": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./ci-helper/bin/php/phpmd.sh",
89+
"bin:js-lint": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./ci-helper/bin/js/js-lint.sh",
90+
"bin:js-test": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ./ci-helper/bin/js/js-test.sh",
91+
"bin:build": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} TRAVIS_REPO_SLUG=technote-space/marker-animation TRAVIS_TAG=v1.2.3 source ./ci-helper/bin/deploy/env.sh && bash ./ci-helper/bin/deploy/create.sh",
92+
"bin:test": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} TRAVIS_REPO_SLUG=technote-space/marker-animation TRAVIS_TAG=v1.2.3 bash ./ci-helper/bin/test.sh",
93+
"bin:test-p": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} TRAVIS_REPO_SLUG=technote-space/marker-animation TRAVIS_TAG=v1.2.3 ACTIVATE_POPULAR_PLUGINS=1 bash ./ci-helper/bin/test.sh",
9494
"bin:download": [
95-
"mkdir -p ./travis-ci/.git",
96-
"chmod -R +w ./travis-ci/.git && rm -rdf ./travis-ci",
95+
"mkdir -p ./ci-helper/.git",
96+
"chmod -R +w ./ci-helper/.git && rm -rdf ./ci-helper",
9797
"rm -f ./tests/bootstrap.php ./.coveralls.yml ./phpcs.xml ./phpmd.xml phpunit.xml",
98-
"git clone --depth=1 https://github.com/wp-content-framework/travis-ci.git travis-ci"
98+
"git clone --depth=1 https://github.com/wp-content-framework/ci-helper.git ci-helper"
9999
],
100-
"bin:prepare": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ACTIVATE_POPULAR_PLUGINS=1 bash ./travis-ci/bin/prepare.sh",
101-
"bin:gh-pages": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} GH_PAGES_APP_ID=editor GH_PAGES_PLUGIN_SCRIPT='./index.min.js' GH_PAGES_PLUGIN_STYLE='./index.css' GH_PAGES_TITLE='Marker Animation' GH_PAGES_TEMPLATE=gutenberg bash ./travis-ci/bin/deploy/gh-pages.sh",
100+
"bin:prepare": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} ACTIVATE_POPULAR_PLUGINS=1 bash ./ci-helper/bin/prepare.sh",
101+
"bin:gh-pages": "TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} GH_PAGES_APP_ID=editor GH_PAGES_PLUGIN_SCRIPT='./index.min.js' GH_PAGES_PLUGIN_STYLE='./index.css' GH_PAGES_TITLE='Marker Animation' GH_PAGES_TEMPLATE=gutenberg bash ./ci-helper/bin/deploy/gh-pages.sh",
102102
"bin:update": [
103-
"TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} bash ./travis-ci/bin/update/composer.sh",
104-
"TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} bash ./travis-ci/bin/update/package.sh"
103+
"TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} bash ./ci-helper/bin/update/composer.sh",
104+
"TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$(cd $(dirname $0); pwd)} bash ./ci-helper/bin/update/package.sh"
105105
]
106106
},
107107
"config": {

0 commit comments

Comments
 (0)