diff --git a/.github/workflows/scatter-publish.yml b/.github/workflows/scatter-publish.yml index 0305171..6c454f5 100644 --- a/.github/workflows/scatter-publish.yml +++ b/.github/workflows/scatter-publish.yml @@ -14,7 +14,7 @@ jobs: with: node-version: 14 registry-url: https://registry.npmjs.org/ - - run: yarn + - run: npm install - run: npm run build - run: npm run test - run: cd plugins/plugin-chart-scatter && npm publish diff --git a/.github/workflows/table-publish.yml b/.github/workflows/table-publish.yml index 6d52530..b7e40da 100644 --- a/.github/workflows/table-publish.yml +++ b/.github/workflows/table-publish.yml @@ -14,7 +14,7 @@ jobs: with: node-version: 14 registry-url: https://registry.npmjs.org/ - - run: yarn + - run: npm install - run: npm run build - run: npm run test - run: cd plugins/plugin-chart-table-extended && npm publish diff --git a/lerna.json b/lerna.json index 350db80..0cbb1ab 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "3.2.1", - "npmClient": "yarn", + "npmClient": "npm", "packages": [ "packages/*", "plugins/*" diff --git a/package.json b/package.json index 2846147..e853d00 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,10 @@ "release": "yarn build && lerna publish", "list-changed-packages": "lerna changed", "manual-release": "lerna publish --force-publish && yarn postrelease", - "clean-npm-lock": "rm -rf package-lock.json ./{packages,plugins}/*/package-lock.json" + "clean-npm-lock": "rm -rf package-lock.json ./{packages,plugins}/*/package-lock.json", + "postinstall": "run-p install:*", + "install:plugin-chart-scatter": "cd plugins/plugin-chart-scatter && npm install", + "install:plugin-chart-table-extended": "cd plugins/plugin-chart-table-extended && npm install" }, "repository": "https://github.com/w11k/superset-chart-plugins.git", "keywords": [ @@ -146,5 +149,8 @@ "*.{js,jsx,ts,tsx,json,md}": [ "prettier --write" ] + }, + "devDependencies": { + "npm-run-all": "^4.1.5" } } diff --git a/plugins/plugin-chart-scatter/package-lock.json b/plugins/plugin-chart-scatter/package-lock.json index 6a27e12..6131786 100644 --- a/plugins/plugin-chart-scatter/package-lock.json +++ b/plugins/plugin-chart-scatter/package-lock.json @@ -387,7 +387,6 @@ "version": "11.6.0", "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.6.0.tgz", "integrity": "sha512-ElbsWY1KMwEowkv42vGo0UPuLgtPYfIs9BxxVrmvsaJVvktknsHYYlx5NQ5g6zLDcOTyamlDc7FkRg2TAcQDKQ==", - "dev": true, "requires": { "@emotion/memoize": "^0.7.4", "@emotion/sheet": "^1.1.0", @@ -399,20 +398,17 @@ "@emotion/hash": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", - "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", - "dev": true + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" }, "@emotion/memoize": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", - "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==", - "dev": true + "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==" }, "@emotion/react": { "version": "11.7.0", "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.7.0.tgz", "integrity": "sha512-WL93hf9+/2s3cA1JVJlz8+Uy6p6QWukqQFOm2OZO5ki51hfucHMOmbSjiyC3t2Y4RI8XUmBoepoc/24ny/VBbA==", - "dev": true, "requires": { "@babel/runtime": "^7.13.10", "@emotion/cache": "^11.6.0", @@ -427,7 +423,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.2.tgz", "integrity": "sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==", - "dev": true, "requires": { "@emotion/hash": "^0.8.0", "@emotion/memoize": "^0.7.4", @@ -439,34 +434,29 @@ "csstype": { "version": "3.0.10", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", - "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==", - "dev": true + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" } } }, "@emotion/sheet": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.1.0.tgz", - "integrity": "sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==", - "dev": true + "integrity": "sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==" }, "@emotion/unitless": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", - "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", - "dev": true + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" }, "@emotion/utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.0.0.tgz", - "integrity": "sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==", - "dev": true + "integrity": "sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==" }, "@emotion/weak-memoize": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", - "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==", - "dev": true + "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -2723,7 +2713,6 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dev": true, "requires": { "react-is": "^16.7.0" } @@ -5891,8 +5880,7 @@ "stylis": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz", - "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==", - "dev": true + "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==" }, "supports-color": { "version": "5.5.0", diff --git a/plugins/plugin-chart-scatter/package.json b/plugins/plugin-chart-scatter/package.json index d21935e..331915e 100644 --- a/plugins/plugin-chart-scatter/package.json +++ b/plugins/plugin-chart-scatter/package.json @@ -26,6 +26,7 @@ "access": "public" }, "dependencies": { + "@emotion/react": "^11.7.0", "@superset-ui/chart-controls": "^0.18.25", "@superset-ui/core": "^0.18.25", "@superset-ui/plugin-chart-echarts": "^0.18.25", @@ -41,7 +42,6 @@ "react-dom": "^16.13.0" }, "devDependencies": { - "@emotion/react": "^11.7.0", "@types/jest": "^26.0.0", "jest": "^26.0.1" } diff --git a/plugins/plugin-chart-scatter/src/Scatter/transformProps.ts b/plugins/plugin-chart-scatter/src/Scatter/transformProps.ts index 05f0b92..202a69c 100644 --- a/plugins/plugin-chart-scatter/src/Scatter/transformProps.ts +++ b/plugins/plugin-chart-scatter/src/Scatter/transformProps.ts @@ -37,7 +37,7 @@ import { getRegressionTransform, scaleNumberToBubbleSize, } from './transforms'; -import { defaultGrid } from '../../node_modules/@superset-ui/plugin-chart-echarts/lib/defaults'; +import { defaultGrid } from '../defaults'; import { DEFAULT_FORM_DATA, EchartsScatterChartProps, diff --git a/plugins/plugin-chart-table-extended/package-lock.json b/plugins/plugin-chart-table-extended/package-lock.json index fb640cb..4ec37ba 100644 --- a/plugins/plugin-chart-table-extended/package-lock.json +++ b/plugins/plugin-chart-table-extended/package-lock.json @@ -54,6 +54,81 @@ "resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.4.0.tgz", "integrity": "sha512-JZButFdZ1+/xAfpguQHoabIXkcqRRKpMrWKBkpEZZyxfY9C1DpADFB8PEqGSTeFr135SaTRfKqGKx5xSCLI7ZQ==" }, + "@emotion/cache": { + "version": "11.6.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.6.0.tgz", + "integrity": "sha512-ElbsWY1KMwEowkv42vGo0UPuLgtPYfIs9BxxVrmvsaJVvktknsHYYlx5NQ5g6zLDcOTyamlDc7FkRg2TAcQDKQ==", + "requires": { + "@emotion/memoize": "^0.7.4", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "stylis": "^4.0.10" + } + }, + "@emotion/hash": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz", + "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==" + }, + "@emotion/memoize": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", + "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==" + }, + "@emotion/react": { + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.7.0.tgz", + "integrity": "sha512-WL93hf9+/2s3cA1JVJlz8+Uy6p6QWukqQFOm2OZO5ki51hfucHMOmbSjiyC3t2Y4RI8XUmBoepoc/24ny/VBbA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/cache": "^11.6.0", + "@emotion/serialize": "^1.0.2", + "@emotion/sheet": "^1.1.0", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "hoist-non-react-statics": "^3.3.1" + } + }, + "@emotion/serialize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.2.tgz", + "integrity": "sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==", + "requires": { + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.4", + "@emotion/unitless": "^0.7.5", + "@emotion/utils": "^1.0.0", + "csstype": "^3.0.2" + }, + "dependencies": { + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + } + } + }, + "@emotion/sheet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.1.0.tgz", + "integrity": "sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g==" + }, + "@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==" + }, + "@emotion/utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.0.0.tgz", + "integrity": "sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==" + }, + "@emotion/weak-memoize": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz", + "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" + }, "@react-icons/all-files": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@react-icons/all-files/-/all-files-4.1.0.tgz", @@ -460,6 +535,14 @@ "resolved": "https://registry.npmjs.org/fetch-retry/-/fetch-retry-4.1.1.tgz", "integrity": "sha512-e6eB7zN6UBSwGVwrbWVH+gdLnkW9WwHhmq2YDK1Sh30pzx1onRVGBvogTlUeWxwTa+L86NYdo4hFkh7O8ZjSnA==" }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + }, "html-to-react": { "version": "1.4.7", "resolved": "https://registry.npmjs.org/html-to-react/-/html-to-react-1.4.7.tgz", @@ -1153,6 +1236,11 @@ "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", "integrity": "sha1-aYLMMEn7tM2F+LJFaLnZvznu/5c=" }, + "stylis": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz", + "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==" + }, "toggle-selection": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", diff --git a/plugins/plugin-chart-table-extended/package.json b/plugins/plugin-chart-table-extended/package.json index 201ecfd..a6bb8d8 100644 --- a/plugins/plugin-chart-table-extended/package.json +++ b/plugins/plugin-chart-table-extended/package.json @@ -26,6 +26,7 @@ "access": "public" }, "dependencies": { + "@emotion/react": "^11.7.0", "@react-icons/all-files": "^4.1.0", "@superset-ui/chart-controls": "0.18.13", "@superset-ui/core": "0.18.13", diff --git a/scripts/build.js b/scripts/build.js index 8171880..c2eb30e 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -74,16 +74,14 @@ function getPackages(packagePattern, tsOnly = false) { .filter(x => !META_PACKAGES.has(x)), ), ]; - if (packages.length === 0) { - throw new Error('No matching packages'); - } - return `@w11k/${packages.length > 1 ? `{${packages.join(',')}}` : packages[0]}`; + + return '@w11k/*'; } let scope = getPackages(glob); if (shouldLint) { - run(`yarn lint --fix {packages,plugins}/${scope}/{src,test}`); + run(`npm run lint --fix {packages,plugins}/${scope}/{src,test}`); } if (shouldCleanup) { diff --git a/tsconfig.options.json b/tsconfig.options.json index 479acb0..55e4b16 100644 --- a/tsconfig.options.json +++ b/tsconfig.options.json @@ -26,7 +26,7 @@ "skipLibCheck": true, "emitDeclarationOnly": true, "resolveJsonModule": true, - "types": ["@emotion/react/types/css-prop", "jest", "jsdom"], + "types": ["jest", "jsdom"], "typeRoots": [ "./node_modules/@types" ]