2019-01-23 15:31:45 -05:00
|
|
|
{
|
2019-02-22 20:30:35 -05:00
|
|
|
"name": "@superset-ui/plugins-monorepo",
|
2019-04-01 16:56:29 -04:00
|
|
|
"version": "0.0.0-master",
|
2019-02-22 20:30:35 -05:00
|
|
|
"description": "Superset UI Plugins",
|
2019-01-23 15:31:45 -05:00
|
|
|
"private": true,
|
|
|
|
"scripts": {
|
2020-02-05 15:50:45 -05:00
|
|
|
"build": "yarn babel && yarn type && yarn build:assets",
|
|
|
|
"babel": "yarn babel:cjs && yarn babel:esm",
|
|
|
|
"babel:cjs": "nimbus babel --clean --workspaces=\"@superset-ui/!(plugins-demo)\"",
|
|
|
|
"babel:esm": "nimbus babel --clean --workspaces=\"@superset-ui/!(plugins-demo)\" --esm",
|
|
|
|
"build:assets": "node ./scripts/buildAssets.js",
|
|
|
|
"clean": "rm -rf ./packages/**/{lib,esm}",
|
2019-04-01 16:56:29 -04:00
|
|
|
"commit": "superset-commit",
|
|
|
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
2020-02-05 15:50:45 -05:00
|
|
|
"format": "yarn prettier --write",
|
|
|
|
"jest": "NODE_ENV=test nimbus jest --coverage --verbose",
|
|
|
|
"lint": "nimbus eslint && nimbus prettier --check",
|
2020-02-05 16:51:52 -05:00
|
|
|
"lint:fix": "nimbus eslint --fix",
|
2020-02-05 15:50:45 -05:00
|
|
|
"prettier": "nimbus prettier",
|
|
|
|
"test": "yarn type && yarn jest",
|
|
|
|
"test:watch": "yarn lint:fix && yarn jest --watch",
|
|
|
|
"type": "nimbus typescript --build --reference-workspaces",
|
|
|
|
"prepare-release": "git checkout master && git pull --rebase origin master && lerna bootstrap && yarn install && yarn test",
|
|
|
|
"prerelease": "yarn build",
|
|
|
|
"pretest": "yarn lint",
|
|
|
|
"release": "yarn prepare-release && lerna publish --exact && yarn postrelease",
|
2020-02-05 16:16:32 -05:00
|
|
|
"postrelease": "lerna run deploy-demo",
|
|
|
|
"storybook": "cd packages/superset-ui-plugins-demo && yarn storybook"
|
2019-01-23 15:31:45 -05:00
|
|
|
},
|
2019-02-22 20:30:35 -05:00
|
|
|
"repository": "https://github.com/apache-superset/superset-ui-plugins.git",
|
2019-01-23 15:31:45 -05:00
|
|
|
"keywords": [
|
|
|
|
"apache",
|
|
|
|
"superset",
|
|
|
|
"data",
|
|
|
|
"analytics",
|
|
|
|
"analysis",
|
|
|
|
"visualization",
|
|
|
|
"react",
|
|
|
|
"d3",
|
|
|
|
"data-ui",
|
|
|
|
"vx"
|
|
|
|
],
|
|
|
|
"license": "Apache-2.0",
|
|
|
|
"devDependencies": {
|
2020-02-05 15:50:45 -05:00
|
|
|
"@airbnb/config-babel": "^2.1.3",
|
|
|
|
"@airbnb/config-eslint": "^2.1.3",
|
|
|
|
"@airbnb/config-jest": "^2.1.3",
|
|
|
|
"@airbnb/config-prettier": "^2.0.4",
|
|
|
|
"@airbnb/config-typescript": "^2.1.2",
|
|
|
|
"@airbnb/nimbus": "^2.1.3",
|
2019-04-01 16:56:29 -04:00
|
|
|
"@superset-ui/commit-config": "^0.0.9",
|
2019-11-20 01:59:41 -05:00
|
|
|
"@superset-ui/superset-ui": "^0.12.5",
|
2020-02-05 15:50:45 -05:00
|
|
|
"@types/enzyme": "^3.10.3",
|
2020-02-20 13:37:52 -05:00
|
|
|
"@types/jest": "^25.1.3",
|
2020-02-05 15:50:45 -05:00
|
|
|
"@types/jsdom": "^12.2.4",
|
2020-03-04 19:01:03 -05:00
|
|
|
"@types/react": "^16.9.23",
|
|
|
|
"@types/react-test-renderer": "^16.9.2",
|
2019-03-13 17:15:33 -04:00
|
|
|
"csstype": "^2.6.3",
|
2020-02-05 15:50:45 -05:00
|
|
|
"enzyme": "^3.10.0",
|
|
|
|
"enzyme-adapter-react-16": "^1.15.1",
|
|
|
|
"enzyme-to-json": "^3.4.3",
|
2019-06-19 02:32:24 -04:00
|
|
|
"fast-glob": "^3.0.1",
|
2019-05-24 11:43:43 -04:00
|
|
|
"fs-extra": "^8.0.1",
|
2020-02-05 16:18:07 -05:00
|
|
|
"husky": "^4.2.1",
|
fix(legacy-table): avoid React DOM (#392)
* fix(legacy-table): avoid React DOM
`jquery.datatables` will manipulate DOMs, sometimes remove them. In case
of component being reloaded with updated props, React will not be able
to find those removed nodes, causing a `cannot removeChild` error.
Because of the the way to assign row keys, if table shape changes (add
or remove columns), React may also have difficulty match the cached
nodes via keys.
In general it's a bad idea to directly manipulate React rendered DOM
nodes, so we better just let `jquery.datatables` handle everything.
In the future, once we removed `jquery.datatables`, a pure React
component will not have such issues.
* fix(legacy-table): handle the case when percentMetrics is null
* fix(legacy-table): linting errors
* refactor: use nimbus build
* test(legacy-table): add React component tests
* test(legacy-table): more sophisticated cases
* fix: address PR #392 comments
* chore(legacy-table): clean up tests case setups
Not seeing the console.warn errors anymore. So cleaning it up.
Previously it was from `<SuperChart />` component, but since we have
updated the test case to not use <SuperChart>, we are good now.
* fix(legacy-table): misleading comment
2020-03-09 15:45:33 -04:00
|
|
|
"identity-obj-proxy": "^3.0.0",
|
2020-02-05 15:50:45 -05:00
|
|
|
"jest-mock-console": "^1.0.0",
|
|
|
|
"lerna": "^3.15.0",
|
2020-02-07 02:08:56 -05:00
|
|
|
"lint-staged": "^10.0.7",
|
2020-03-04 19:01:03 -05:00
|
|
|
"react": "^16.9.23",
|
|
|
|
"react-dom": "^16.9.23",
|
|
|
|
"react-test-renderer": "^16.9.2"
|
2019-01-23 15:31:45 -05:00
|
|
|
},
|
2020-02-05 15:50:45 -05:00
|
|
|
"engines": {
|
|
|
|
"node": ">=10.10.0",
|
|
|
|
"npm": ">=6.8.0",
|
|
|
|
"yarn": ">=1.13.0"
|
|
|
|
},
|
2019-01-23 15:31:45 -05:00
|
|
|
"workspaces": [
|
|
|
|
"./packages/*"
|
|
|
|
],
|
2020-02-14 02:37:24 -05:00
|
|
|
"browserslist": [
|
|
|
|
"last 3 chrome versions",
|
|
|
|
"last 3 firefox versions",
|
|
|
|
"last 3 safari versions",
|
|
|
|
"last 3 edge versions"
|
|
|
|
],
|
2020-02-05 15:50:45 -05:00
|
|
|
"nimbus": {
|
|
|
|
"drivers": [
|
|
|
|
"babel",
|
|
|
|
"eslint",
|
|
|
|
"jest",
|
|
|
|
"prettier",
|
|
|
|
"typescript"
|
|
|
|
],
|
|
|
|
"settings": {
|
|
|
|
"library": true,
|
|
|
|
"react": true,
|
|
|
|
"next": true,
|
|
|
|
"env": {
|
2020-02-14 02:37:24 -05:00
|
|
|
"targets": false
|
2020-02-05 15:50:45 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"jest": {
|
|
|
|
"timers": "real",
|
|
|
|
"setupFilesAfterEnv": [
|
fix(legacy-table): avoid React DOM (#392)
* fix(legacy-table): avoid React DOM
`jquery.datatables` will manipulate DOMs, sometimes remove them. In case
of component being reloaded with updated props, React will not be able
to find those removed nodes, causing a `cannot removeChild` error.
Because of the the way to assign row keys, if table shape changes (add
or remove columns), React may also have difficulty match the cached
nodes via keys.
In general it's a bad idea to directly manipulate React rendered DOM
nodes, so we better just let `jquery.datatables` handle everything.
In the future, once we removed `jquery.datatables`, a pure React
component will not have such issues.
* fix(legacy-table): handle the case when percentMetrics is null
* fix(legacy-table): linting errors
* refactor: use nimbus build
* test(legacy-table): add React component tests
* test(legacy-table): more sophisticated cases
* fix: address PR #392 comments
* chore(legacy-table): clean up tests case setups
Not seeing the console.warn errors anymore. So cleaning it up.
Previously it was from `<SuperChart />` component, but since we have
updated the test case to not use <SuperChart>, we are good now.
* fix(legacy-table): misleading comment
2020-03-09 15:45:33 -04:00
|
|
|
"@airbnb/config-jest/enzyme",
|
|
|
|
"./scripts/setupJest.js"
|
2020-02-05 15:50:45 -05:00
|
|
|
],
|
|
|
|
"coverageThreshold": {
|
|
|
|
"global": {
|
|
|
|
"branches": 1,
|
|
|
|
"functions": 1,
|
|
|
|
"lines": 1,
|
|
|
|
"statements": 1
|
|
|
|
}
|
fix(legacy-table): avoid React DOM (#392)
* fix(legacy-table): avoid React DOM
`jquery.datatables` will manipulate DOMs, sometimes remove them. In case
of component being reloaded with updated props, React will not be able
to find those removed nodes, causing a `cannot removeChild` error.
Because of the the way to assign row keys, if table shape changes (add
or remove columns), React may also have difficulty match the cached
nodes via keys.
In general it's a bad idea to directly manipulate React rendered DOM
nodes, so we better just let `jquery.datatables` handle everything.
In the future, once we removed `jquery.datatables`, a pure React
component will not have such issues.
* fix(legacy-table): handle the case when percentMetrics is null
* fix(legacy-table): linting errors
* refactor: use nimbus build
* test(legacy-table): add React component tests
* test(legacy-table): more sophisticated cases
* fix: address PR #392 comments
* chore(legacy-table): clean up tests case setups
Not seeing the console.warn errors anymore. So cleaning it up.
Previously it was from `<SuperChart />` component, but since we have
updated the test case to not use <SuperChart>, we are good now.
* fix(legacy-table): misleading comment
2020-03-09 15:45:33 -04:00
|
|
|
},
|
|
|
|
"moduleNameMapper": {
|
|
|
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
|
|
|
"\\.(css|less)$": "identity-obj-proxy"
|
2020-02-05 15:50:45 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"eslint": {
|
|
|
|
"overrides": [
|
|
|
|
{
|
|
|
|
"files": "*.test.{js,jsx,ts,tsx}",
|
|
|
|
"rules": {
|
|
|
|
"import/no-extraneous-dependencies": "off",
|
|
|
|
"promise/param-names": "off",
|
|
|
|
"import/extensions": "off",
|
|
|
|
"jest/require-to-throw-message": "off",
|
|
|
|
"jest/no-test-return-statement": "off",
|
|
|
|
"jest/no-expect-resolves": "off",
|
|
|
|
"jest/no-test-callback": "off"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"files": "*.{js,jsx,ts,tsx}",
|
|
|
|
"rules": {
|
|
|
|
"react/jsx-no-literals": "off",
|
|
|
|
"prefer-exponentiation-operator": "off",
|
2020-02-07 18:51:33 -05:00
|
|
|
"@typescript-eslint/no-explicit-any": [
|
|
|
|
"warn",
|
|
|
|
{
|
|
|
|
"fixToUnknown": false
|
|
|
|
}
|
|
|
|
]
|
2020-02-05 15:50:45 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"typescript": {
|
|
|
|
"compilerOptions": {
|
|
|
|
"emitDeclarationOnly": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-01-23 15:31:45 -05:00
|
|
|
"husky": {
|
|
|
|
"hooks": {
|
2019-02-25 16:24:22 -05:00
|
|
|
"pre-commit": "lint-staged",
|
|
|
|
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
2019-01-23 15:31:45 -05:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"lint-staged": {
|
|
|
|
"./packages/*/{src,test,storybook}/**/*.{js,jsx,ts,tsx,json,md}": [
|
2020-02-05 15:50:45 -05:00
|
|
|
"yarn prettier --write",
|
2019-01-23 15:31:45 -05:00
|
|
|
"git add"
|
|
|
|
]
|
2020-03-04 19:01:03 -05:00
|
|
|
},
|
|
|
|
"resolutions": {
|
|
|
|
"**/@types/react": "^16.9.23"
|
2019-01-23 15:31:45 -05:00
|
|
|
}
|
|
|
|
}
|