From c379a6208119aaef5629bddfb3cb1aa447c6a1f4 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sun, 23 Jan 2022 21:11:46 -0500 Subject: [PATCH] Imprrove ability to tree-shake libraries (#1050) * Revert "Remove React from page bundle (#1031)" This reverts commit fdfbc1942e7fb239008bb84d7a04dc3f577eef90. * redux-devtools * d3-state-visualizer * d3tooltip * map2tree * react-base16-styling * react-dock and react-json-tree * redux-devtools-app * redux-devtools-chart-monitor * redux-devtools-dock-monitor * redux-devtools-extension * redux-devtools-inspector-monitor-test-tab * redux-devtools-inspector-monitor-trace-tab * redux-devtools-instrument * redux-devtools-log-monitor and redux-devtools-remote * redux-devtools-rtk-query-monitor * redux-devtools-serialize * redux-devtools-slider-monitor * redux-devtools-ui * redux-devtools-utils * Fix build * Fix storybook build Storybook loads the babel.config.json but not .babelrc.json. We actually don't want to load the babel config because it uses @babel/runtime which can't be resolved with Yarn PnP. --- extension/{.babelrc => babel.config.json} | 2 +- extension/src/app/stores/enhancerStore.ts | 2 +- extension/src/app/stores/persistState.ts | 83 -------- packages/d3-state-visualizer/.eslintignore | 2 +- .../d3-state-visualizer/babel.config.esm.json | 7 + .../{.babelrc => babel.config.json} | 0 packages/d3-state-visualizer/package.json | 17 +- packages/d3-state-visualizer/rollup.config.js | 35 +--- packages/d3-state-visualizer/tsconfig.json | 2 +- packages/d3tooltip/.eslintignore | 2 +- packages/d3tooltip/babel.config.esm.json | 7 + .../d3tooltip/{.babelrc => babel.config.json} | 0 packages/d3tooltip/package.json | 20 +- packages/d3tooltip/rollup.config.js | 28 +-- packages/d3tooltip/tsconfig.json | 2 +- packages/map2tree/.eslintignore | 2 +- packages/map2tree/babel.config.esm.json | 7 + .../map2tree/{.babelrc => babel.config.json} | 0 packages/map2tree/package.json | 20 +- packages/map2tree/rollup.config.js | 28 +-- packages/map2tree/tsconfig.json | 2 +- packages/react-base16-styling/.eslintignore | 2 +- .../babel.config.esm.json | 7 + .../{.babelrc => babel.config.json} | 0 packages/react-base16-styling/package.json | 21 +- .../react-base16-styling/rollup.config.js | 23 --- packages/react-base16-styling/src/index.ts | 2 +- packages/react-base16-styling/tsconfig.json | 2 +- packages/react-dock/.eslintignore | 2 +- packages/react-dock/babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 packages/react-dock/package.json | 21 +- packages/react-dock/rollup.config.js | 23 --- packages/react-dock/tsconfig.json | 2 +- packages/react-json-tree/.eslintignore | 2 +- .../react-json-tree/babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 packages/react-json-tree/package.json | 20 +- packages/react-json-tree/rollup.config.js | 33 +-- packages/react-json-tree/src/index.tsx | 8 +- packages/react-json-tree/tsconfig.json | 2 +- packages/redux-devtools-app/.eslintignore | 2 +- .../redux-devtools-app/babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 packages/redux-devtools-app/package.json | 22 +- packages/redux-devtools-app/rollup.config.js | 54 ----- packages/redux-devtools-app/tsconfig.json | 2 +- .../.eslintignore | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../redux-devtools-chart-monitor/package.json | 21 +- .../rollup.config.js | 31 --- .../tsconfig.json | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../redux-devtools-dock-monitor/package.json | 21 +- .../rollup.config.js | 29 --- .../redux-devtools-dock-monitor/tsconfig.json | 2 +- .../redux-devtools-extension/.eslintignore | 2 +- .../babel.config.esm.json | 7 + .../{.babelrc => babel.config.json} | 0 .../redux-devtools-extension/package.json | 19 +- .../redux-devtools-extension/rollup.config.js | 29 --- .../redux-devtools-extension/tsconfig.json | 2 +- .../.eslintignore | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../package.json | 21 +- .../rollup.config.js | 40 ---- .../tsconfig.json | 2 +- .../.eslintignore | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../package.json | 24 ++- .../src/react-error-overlay/utils/unmapper.ts | 2 +- .../tsconfig.json | 2 +- .../.eslintignore | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../package.json | 21 +- .../rollup.config.js | 40 ---- .../src/index.ts | 4 +- .../tsconfig.json | 2 +- .../redux-devtools-instrument/.eslintignore | 2 +- .../babel.config.esm.json | 6 + .../{.babelrc => babel.config.json} | 0 .../redux-devtools-instrument/package.json | 21 +- .../rollup.config.js | 23 --- .../redux-devtools-instrument/tsconfig.json | 2 +- .../redux-devtools-log-monitor/.eslintignore | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../redux-devtools-log-monitor/package.json | 21 +- .../rollup.config.js | 37 ---- .../redux-devtools-log-monitor/tsconfig.json | 2 +- packages/redux-devtools-remote/.eslintignore | 2 +- .../babel.config.esm.json | 7 + .../{.babelrc => babel.config.json} | 0 packages/redux-devtools-remote/package.json | 22 +- .../redux-devtools-remote/rollup.config.js | 36 ---- packages/redux-devtools-remote/tsconfig.json | 2 +- .../.eslintignore | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../package.json | 21 +- .../rollup.config.js | 43 ---- .../tsconfig.json | 2 +- .../redux-devtools-serialize/.eslintignore | 2 +- .../babel.config.esm.json | 7 + .../{.babelrc => babel.config.json} | 0 .../redux-devtools-serialize/package.json | 21 +- .../redux-devtools-serialize/rollup.config.js | 29 --- .../redux-devtools-serialize/tsconfig.json | 2 +- .../.eslintignore | 2 +- .../babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 .../package.json | 17 +- .../rollup.config.js | 36 ---- .../tsconfig.json | 2 +- .../{.babelrc => .babelrc.json} | 0 packages/redux-devtools-ui/.eslintignore | 2 +- .../redux-devtools-ui/babel.config.esm.json | 8 + packages/redux-devtools-ui/package.json | 27 +-- packages/redux-devtools-ui/rollup.config.js | 43 ---- packages/redux-devtools-ui/src/Tabs/index.ts | 2 +- packages/redux-devtools-ui/src/index.ts | 10 +- packages/redux-devtools-ui/tsconfig.json | 2 +- packages/redux-devtools-utils/.eslintignore | 2 +- .../babel.config.esm.json | 7 + .../{.babelrc => babel.config.json} | 0 packages/redux-devtools-utils/package.json | 21 +- .../redux-devtools-utils/rollup.config.js | 36 ---- packages/redux-devtools-utils/tsconfig.json | 2 +- packages/redux-devtools/.eslintignore | 2 +- packages/redux-devtools/babel.config.esm.json | 8 + .../{.babelrc => babel.config.json} | 0 packages/redux-devtools/package.json | 21 +- packages/redux-devtools/rollup.config.js | 30 --- packages/redux-devtools/src/index.ts | 8 +- packages/redux-devtools/tsconfig.json | 2 +- yarn.lock | 189 ++++++++---------- 141 files changed, 594 insertions(+), 1136 deletions(-) rename extension/{.babelrc => babel.config.json} (60%) delete mode 100644 extension/src/app/stores/persistState.ts create mode 100644 packages/d3-state-visualizer/babel.config.esm.json rename packages/d3-state-visualizer/{.babelrc => babel.config.json} (100%) create mode 100644 packages/d3tooltip/babel.config.esm.json rename packages/d3tooltip/{.babelrc => babel.config.json} (100%) create mode 100644 packages/map2tree/babel.config.esm.json rename packages/map2tree/{.babelrc => babel.config.json} (100%) mode change 100755 => 100644 create mode 100644 packages/react-base16-styling/babel.config.esm.json rename packages/react-base16-styling/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/react-base16-styling/rollup.config.js create mode 100644 packages/react-dock/babel.config.esm.json rename packages/react-dock/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/react-dock/rollup.config.js create mode 100644 packages/react-json-tree/babel.config.esm.json rename packages/react-json-tree/{.babelrc => babel.config.json} (100%) create mode 100644 packages/redux-devtools-app/babel.config.esm.json rename packages/redux-devtools-app/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-app/rollup.config.js create mode 100644 packages/redux-devtools-chart-monitor/babel.config.esm.json rename packages/redux-devtools-chart-monitor/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-chart-monitor/rollup.config.js create mode 100644 packages/redux-devtools-dock-monitor/babel.config.esm.json rename packages/redux-devtools-dock-monitor/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-dock-monitor/rollup.config.js create mode 100644 packages/redux-devtools-extension/babel.config.esm.json rename packages/redux-devtools-extension/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-extension/rollup.config.js create mode 100644 packages/redux-devtools-inspector-monitor-test-tab/babel.config.esm.json rename packages/redux-devtools-inspector-monitor-test-tab/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-inspector-monitor-test-tab/rollup.config.js create mode 100644 packages/redux-devtools-inspector-monitor-trace-tab/babel.config.esm.json rename packages/redux-devtools-inspector-monitor-trace-tab/{.babelrc => babel.config.json} (100%) create mode 100644 packages/redux-devtools-inspector-monitor/babel.config.esm.json rename packages/redux-devtools-inspector-monitor/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-inspector-monitor/rollup.config.js create mode 100644 packages/redux-devtools-instrument/babel.config.esm.json rename packages/redux-devtools-instrument/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-instrument/rollup.config.js create mode 100644 packages/redux-devtools-log-monitor/babel.config.esm.json rename packages/redux-devtools-log-monitor/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-log-monitor/rollup.config.js create mode 100644 packages/redux-devtools-remote/babel.config.esm.json rename packages/redux-devtools-remote/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-remote/rollup.config.js create mode 100644 packages/redux-devtools-rtk-query-monitor/babel.config.esm.json rename packages/redux-devtools-rtk-query-monitor/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-rtk-query-monitor/rollup.config.js create mode 100644 packages/redux-devtools-serialize/babel.config.esm.json rename packages/redux-devtools-serialize/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-serialize/rollup.config.js create mode 100644 packages/redux-devtools-slider-monitor/babel.config.esm.json rename packages/redux-devtools-slider-monitor/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-slider-monitor/rollup.config.js rename packages/redux-devtools-ui/{.babelrc => .babelrc.json} (100%) create mode 100644 packages/redux-devtools-ui/babel.config.esm.json delete mode 100644 packages/redux-devtools-ui/rollup.config.js create mode 100644 packages/redux-devtools-utils/babel.config.esm.json rename packages/redux-devtools-utils/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools-utils/rollup.config.js create mode 100644 packages/redux-devtools/babel.config.esm.json rename packages/redux-devtools/{.babelrc => babel.config.json} (100%) delete mode 100644 packages/redux-devtools/rollup.config.js diff --git a/extension/.babelrc b/extension/babel.config.json similarity index 60% rename from extension/.babelrc rename to extension/babel.config.json index 202d425a..47246cb3 100644 --- a/extension/.babelrc +++ b/extension/babel.config.json @@ -1,6 +1,6 @@ { "presets": [ - "@babel/preset-env", + ["@babel/preset-env", { "targets": "defaults" }], "@babel/preset-react", "@babel/preset-typescript" ] diff --git a/extension/src/app/stores/enhancerStore.ts b/extension/src/app/stores/enhancerStore.ts index 578f0f1c..532cfccb 100644 --- a/extension/src/app/stores/enhancerStore.ts +++ b/extension/src/app/stores/enhancerStore.ts @@ -1,6 +1,6 @@ import { Action, compose, Reducer, StoreEnhancerStoreCreator } from 'redux'; import { instrument } from '@redux-devtools/instrument'; -import persistState from './persistState'; +import { persistState } from '@redux-devtools/core'; import { ConfigWithExpandedMaxAge } from '../../browser/extension/inject/pageScript'; export function getUrlParam(key: string) { diff --git a/extension/src/app/stores/persistState.ts b/extension/src/app/stores/persistState.ts deleted file mode 100644 index 2a73babc..00000000 --- a/extension/src/app/stores/persistState.ts +++ /dev/null @@ -1,83 +0,0 @@ -import mapValues from 'lodash/mapValues'; -import identity from 'lodash/identity'; -import { Action, PreloadedState, Reducer, StoreEnhancer } from 'redux'; -import { LiftedState } from '@redux-devtools/instrument'; - -export default function persistState< - S, - A extends Action, - MonitorState ->( - sessionId?: string | null, - deserializeState: (state: S) => S = identity, - deserializeAction: (action: A) => A = identity -): StoreEnhancer { - if (!sessionId) { - return (next) => - (...args) => - next(...args); - } - - function deserialize( - state: LiftedState - ): LiftedState { - return { - ...state, - actionsById: mapValues(state.actionsById, (liftedAction) => ({ - ...liftedAction, - action: deserializeAction(liftedAction.action), - })), - committedState: deserializeState(state.committedState), - computedStates: state.computedStates.map((computedState) => ({ - ...computedState, - state: deserializeState(computedState.state), - })), - }; - } - - return (next) => - >( - reducer: Reducer, - initialState?: PreloadedState - ) => { - const key = `redux-dev-session-${sessionId}`; - - let finalInitialState; - try { - const json = localStorage.getItem(key); - if (json) { - finalInitialState = - deserialize(JSON.parse(json) as LiftedState) || - initialState; - next(reducer, initialState); - } - } catch (e) { - console.warn('Could not read debug session from localStorage:', e); // eslint-disable-line no-console - try { - localStorage.removeItem(key); - } finally { - finalInitialState = undefined; - } - } - - const store = next( - reducer, - finalInitialState as PreloadedState | undefined - ); - - return { - ...store, - dispatch(action: T) { - store.dispatch(action); - - try { - localStorage.setItem(key, JSON.stringify(store.getState())); - } catch (e) { - console.warn('Could not write debug session to localStorage:', e); // eslint-disable-line no-console - } - - return action; - }, - }; - }; -} diff --git a/packages/d3-state-visualizer/.eslintignore b/packages/d3-state-visualizer/.eslintignore index 4bf718e4..be897dba 100644 --- a/packages/d3-state-visualizer/.eslintignore +++ b/packages/d3-state-visualizer/.eslintignore @@ -1,2 +1,2 @@ examples -dist +lib diff --git a/packages/d3-state-visualizer/babel.config.esm.json b/packages/d3-state-visualizer/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/d3-state-visualizer/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/d3-state-visualizer/.babelrc b/packages/d3-state-visualizer/babel.config.json similarity index 100% rename from packages/d3-state-visualizer/.babelrc rename to packages/d3-state-visualizer/babel.config.json diff --git a/packages/d3-state-visualizer/package.json b/packages/d3-state-visualizer/package.json index ead56ed5..1523df41 100644 --- a/packages/d3-state-visualizer/package.json +++ b/packages/d3-state-visualizer/package.json @@ -17,19 +17,25 @@ "author": "romseguy", "files": [ "dist", + "lib", "src" ], - "main": "dist/d3-state-visualizer.cjs.js", - "module": "dist/d3-state-visualizer.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", "unpkg": "dist/d3-state-visualizer.umd.js", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "build:umd": "rollup -c", + "clean": "rimraf lib", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -45,6 +51,7 @@ "ramda": "^0.28.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", diff --git a/packages/d3-state-visualizer/rollup.config.js b/packages/d3-state-visualizer/rollup.config.js index f2f518bb..70ce4df1 100644 --- a/packages/d3-state-visualizer/rollup.config.js +++ b/packages/d3-state-visualizer/rollup.config.js @@ -9,11 +9,13 @@ const config = [ input: 'src/index.ts', output: { name: 'd3-state-visualizer', - file: 'dist/d3-state-visualizer.umd.js', + file: 'lib/umd/d3-state-visualizer.js', format: 'umd', }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -27,11 +29,13 @@ const config = [ input: 'src/index.ts', output: { name: 'd3-state-visualizer', - file: 'dist/d3-state-visualizer.umd.min.js', + file: 'lib/umd/d3-state-visualizer.min.js', format: 'umd', }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -42,29 +46,6 @@ const config = [ terser(), ], }, - { - input: 'src/index.ts', - output: [ - { file: 'dist/d3-state-visualizer.cjs.js', format: 'cjs' }, - { file: 'dist/d3-state-visualizer.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'd3', - 'ramda', - 'map2tree', - 'deepmerge', - 'd3tooltip', - ], - }, ]; export default config; diff --git a/packages/d3-state-visualizer/tsconfig.json b/packages/d3-state-visualizer/tsconfig.json index 84575cb5..19e4e718 100644 --- a/packages/d3-state-visualizer/tsconfig.json +++ b/packages/d3-state-visualizer/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/d3tooltip/.eslintignore b/packages/d3tooltip/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/d3tooltip/.eslintignore +++ b/packages/d3tooltip/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/d3tooltip/babel.config.esm.json b/packages/d3tooltip/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/d3tooltip/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/d3tooltip/.babelrc b/packages/d3tooltip/babel.config.json similarity index 100% rename from packages/d3tooltip/.babelrc rename to packages/d3tooltip/babel.config.json diff --git a/packages/d3tooltip/package.json b/packages/d3tooltip/package.json index 5d351523..afef4f3c 100644 --- a/packages/d3tooltip/package.json +++ b/packages/d3tooltip/package.json @@ -13,20 +13,25 @@ "license": "MIT", "author": "romseguy", "files": [ - "dist", + "lib", "src" ], - "main": "dist/d3tooltip.cjs.js", - "module": "dist/d3tooltip.esm.js", - "types": "dist/index.d.ts", - "unpkg": "dist/d3tooltip.umd.js", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "unpkg": "lib/umd/d3tooltip.umd.js", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "build:umd": "rollup -c", + "clean": "rimraf lib", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -37,6 +42,7 @@ "ramda": "^0.28.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", diff --git a/packages/d3tooltip/rollup.config.js b/packages/d3tooltip/rollup.config.js index ed4d229b..6a442f22 100644 --- a/packages/d3tooltip/rollup.config.js +++ b/packages/d3tooltip/rollup.config.js @@ -9,11 +9,13 @@ const config = [ input: 'src/index.ts', output: { name: 'd3tooltip', - file: 'dist/d3tooltip.umd.js', + file: 'lib/umd/d3tooltip.js', format: 'umd', }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -27,11 +29,13 @@ const config = [ input: 'src/index.ts', output: { name: 'd3tooltip', - file: 'dist/d3tooltip.umd.min.js', + file: 'lib/umd/d3tooltip.min.js', format: 'umd', }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -42,22 +46,6 @@ const config = [ terser(), ], }, - { - input: 'src/index.ts', - output: [ - { file: 'dist/d3tooltip.cjs.js', format: 'cjs' }, - { file: 'dist/d3tooltip.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [/@babel\/runtime/, 'ramda'], - }, ]; export default config; diff --git a/packages/d3tooltip/tsconfig.json b/packages/d3tooltip/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/d3tooltip/tsconfig.json +++ b/packages/d3tooltip/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/map2tree/.eslintignore b/packages/map2tree/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/map2tree/.eslintignore +++ b/packages/map2tree/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/map2tree/babel.config.esm.json b/packages/map2tree/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/map2tree/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/map2tree/.babelrc b/packages/map2tree/babel.config.json old mode 100755 new mode 100644 similarity index 100% rename from packages/map2tree/.babelrc rename to packages/map2tree/babel.config.json diff --git a/packages/map2tree/package.json b/packages/map2tree/package.json index d483417d..2cf6ec44 100755 --- a/packages/map2tree/package.json +++ b/packages/map2tree/package.json @@ -16,20 +16,25 @@ "license": "MIT", "author": "romseguy", "files": [ - "dist", + "lib", "src" ], - "main": "dist/map2tree.cjs.js", - "module": "dist/map2tree.esm.js", - "types": "dist/index.d.ts", - "unpkg": "dist/map2tree.umd.js", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "unpkg": "lib/umd/map2tree.umd.js", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "build:umd": "rollup -c", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", @@ -41,6 +46,7 @@ "lodash": "^4.17.21" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", diff --git a/packages/map2tree/rollup.config.js b/packages/map2tree/rollup.config.js index db24ba2e..f977bb7c 100644 --- a/packages/map2tree/rollup.config.js +++ b/packages/map2tree/rollup.config.js @@ -9,11 +9,13 @@ const config = [ input: 'src/index.ts', output: { name: 'map2tree', - file: 'dist/map2tree.umd.js', + file: 'lib/umd/map2tree.js', format: 'umd', }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -27,11 +29,13 @@ const config = [ input: 'src/index.ts', output: { name: 'map2tree', - file: 'dist/map2tree.umd.min.js', + file: 'lib/umd/map2tree.min.js', format: 'umd', }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -42,22 +46,6 @@ const config = [ terser(), ], }, - { - input: 'src/index.ts', - output: [ - { file: 'dist/map2tree.cjs.js', format: 'cjs' }, - { file: 'dist/map2tree.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [/@babel\/runtime/, /lodash/], - }, ]; export default config; diff --git a/packages/map2tree/tsconfig.json b/packages/map2tree/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/map2tree/tsconfig.json +++ b/packages/map2tree/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/react-base16-styling/.eslintignore b/packages/react-base16-styling/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/react-base16-styling/.eslintignore +++ b/packages/react-base16-styling/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/react-base16-styling/babel.config.esm.json b/packages/react-base16-styling/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/react-base16-styling/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/react-base16-styling/.babelrc b/packages/react-base16-styling/babel.config.json similarity index 100% rename from packages/react-base16-styling/.babelrc rename to packages/react-base16-styling/babel.config.json diff --git a/packages/react-base16-styling/package.json b/packages/react-base16-styling/package.json index 94910a7e..8ffd17b7 100644 --- a/packages/react-base16-styling/package.json +++ b/packages/react-base16-styling/package.json @@ -15,19 +15,23 @@ "license": "MIT", "author": "Alexander (http://kuzya.org/)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/react-base16-styling.cjs.js", - "module": "dist/react-base16-styling.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "git+https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", @@ -44,12 +48,12 @@ "lodash.curry": "^4.1.1" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@types/color": "^3.0.2", "@types/jest": "^27.4.0", "@types/lodash.curry": "^4.1.6", @@ -60,10 +64,7 @@ "eslint-plugin-jest": "^25.7.0", "jest": "^27.4.7", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5" } } diff --git a/packages/react-base16-styling/rollup.config.js b/packages/react-base16-styling/rollup.config.js deleted file mode 100644 index 0002d276..00000000 --- a/packages/react-base16-styling/rollup.config.js +++ /dev/null @@ -1,23 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { file: 'dist/react-base16-styling.cjs.js', format: 'cjs' }, - { file: 'dist/react-base16-styling.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [/@babel\/runtime/, 'base16', 'color', 'lodash.curry'], - }, -]; - -export default config; diff --git a/packages/react-base16-styling/src/index.ts b/packages/react-base16-styling/src/index.ts index 23a9652b..6a5cfa15 100644 --- a/packages/react-base16-styling/src/index.ts +++ b/packages/react-base16-styling/src/index.ts @@ -301,5 +301,5 @@ export const invertTheme = (theme: Theme | undefined): Theme | undefined => { return theme; }; -export { Base16Theme }; +export type { Base16Theme }; export * from './types'; diff --git a/packages/react-base16-styling/tsconfig.json b/packages/react-base16-styling/tsconfig.json index 84575cb5..19e4e718 100644 --- a/packages/react-base16-styling/tsconfig.json +++ b/packages/react-base16-styling/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/react-dock/.eslintignore b/packages/react-dock/.eslintignore index 5df41e2c..d3c23dcb 100644 --- a/packages/react-dock/.eslintignore +++ b/packages/react-dock/.eslintignore @@ -1,2 +1,2 @@ demo -dist +lib diff --git a/packages/react-dock/babel.config.esm.json b/packages/react-dock/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/react-dock/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/react-dock/.babelrc b/packages/react-dock/babel.config.json similarity index 100% rename from packages/react-dock/.babelrc rename to packages/react-dock/babel.config.json diff --git a/packages/react-dock/package.json b/packages/react-dock/package.json index 8ef825da..b9f5c8dd 100644 --- a/packages/react-dock/package.json +++ b/packages/react-dock/package.json @@ -15,19 +15,23 @@ "license": "MIT", "author": "Alexander (http://kuzya.org/)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/react-dock.cjs.js", - "module": "dist/react-dock.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", @@ -42,13 +46,13 @@ "prop-types": "^15.8.1" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@types/jest": "^27.4.0", "@types/lodash.debounce": "^4.0.6", "@types/react": "^17.0.38", @@ -64,10 +68,7 @@ "react": "^17.0.2", "react-test-renderer": "^17.0.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/react-dock/rollup.config.js b/packages/react-dock/rollup.config.js deleted file mode 100644 index ebd47612..00000000 --- a/packages/react-dock/rollup.config.js +++ /dev/null @@ -1,23 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { file: 'dist/react-dock.cjs.js', format: 'cjs' }, - { file: 'dist/react-dock.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [/@babel\/runtime/, 'react', 'prop-types', 'lodash.debounce'], - }, -]; - -export default config; diff --git a/packages/react-dock/tsconfig.json b/packages/react-dock/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/react-dock/tsconfig.json +++ b/packages/react-dock/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/react-json-tree/.eslintignore b/packages/react-json-tree/.eslintignore index 4d6880d3..be897dba 100644 --- a/packages/react-json-tree/.eslintignore +++ b/packages/react-json-tree/.eslintignore @@ -1,2 +1,2 @@ -dist examples +lib diff --git a/packages/react-json-tree/babel.config.esm.json b/packages/react-json-tree/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/react-json-tree/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/react-json-tree/.babelrc b/packages/react-json-tree/babel.config.json similarity index 100% rename from packages/react-json-tree/.babelrc rename to packages/react-json-tree/babel.config.json diff --git a/packages/react-json-tree/package.json b/packages/react-json-tree/package.json index d9cd338a..8017e5ef 100644 --- a/packages/react-json-tree/package.json +++ b/packages/react-json-tree/package.json @@ -19,20 +19,25 @@ "Mihail Diordiev (https://github.com/zalmoxisus)" ], "files": [ - "dist", + "lib", "src" ], - "main": "dist/react-json-tree.cjs.js", - "module": "dist/react-json-tree.esm.js", - "types": "dist/index.d.ts", - "unpkg": "dist/react-json-tree.umd.js", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "unpkg": "lib/umd/react-json-tree.umd.js", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf umd", + "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "build:umd": "rollup -c", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", @@ -46,6 +51,7 @@ "react-base16-styling": "^0.9.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", diff --git a/packages/react-json-tree/rollup.config.js b/packages/react-json-tree/rollup.config.js index 839926ef..8d2e2555 100644 --- a/packages/react-json-tree/rollup.config.js +++ b/packages/react-json-tree/rollup.config.js @@ -9,14 +9,16 @@ const config = [ input: 'src/index.tsx', output: { name: 'ReactJsonTree', - file: 'dist/react-json-tree.umd.js', + file: 'lib/umd/react-json-tree.js', format: 'umd', globals: { react: 'React', }, }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -31,14 +33,16 @@ const config = [ input: 'src/index.tsx', output: { name: 'ReactJsonTree', - file: 'dist/react-json-tree.umd.min.js', + file: 'lib/umd/react-json-tree.min.js', format: 'umd', globals: { react: 'React', }, }, plugins: [ - typescript(), + typescript({ + tsconfigOverride: { compilerOptions: { declaration: false } }, + }), resolve(), commonjs(), babel({ @@ -50,27 +54,6 @@ const config = [ ], external: ['react'], }, - { - input: 'src/index.tsx', - output: [ - { file: 'dist/react-json-tree.cjs.js', format: 'cjs' }, - { file: 'dist/react-json-tree.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - 'react-base16-styling', - ], - }, ]; export default config; diff --git a/packages/react-json-tree/src/index.tsx b/packages/react-json-tree/src/index.tsx index c422b9ce..df1b70bf 100644 --- a/packages/react-json-tree/src/index.tsx +++ b/packages/react-json-tree/src/index.tsx @@ -9,10 +9,10 @@ import JSONNode from './JSONNode'; import createStylingFromTheme from './createStylingFromTheme'; import { invertTheme, - StylingConfig, - StylingFunction, - StylingValue, - Theme, + type StylingConfig, + type StylingFunction, + type StylingValue, + type Theme, } from 'react-base16-styling'; import { CircularPropsPassedThroughJSONTree } from './types'; diff --git a/packages/react-json-tree/tsconfig.json b/packages/react-json-tree/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/react-json-tree/tsconfig.json +++ b/packages/react-json-tree/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-app/.eslintignore b/packages/redux-devtools-app/.eslintignore index 7925eb32..fba1d4c6 100644 --- a/packages/redux-devtools-app/.eslintignore +++ b/packages/redux-devtools-app/.eslintignore @@ -1,3 +1,3 @@ build -dist +lib umd diff --git a/packages/redux-devtools-app/babel.config.esm.json b/packages/redux-devtools-app/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-app/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-app/.babelrc b/packages/redux-devtools-app/babel.config.json similarity index 100% rename from packages/redux-devtools-app/.babelrc rename to packages/redux-devtools-app/babel.config.json diff --git a/packages/redux-devtools-app/package.json b/packages/redux-devtools-app/package.json index 5d2d0f2b..21f4c15d 100644 --- a/packages/redux-devtools-app/package.json +++ b/packages/redux-devtools-app/package.json @@ -9,13 +9,15 @@ "license": "MIT", "author": "Mihail Diordiev (https://github.com/zalmoxisus)", "files": [ - "dist", + "build", + "lib", "src", "umd" ], - "main": "dist/redux-devtools-app.cjs.js", - "module": "dist/redux-devtools-app.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" @@ -23,11 +25,14 @@ "scripts": { "start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --hot --env development --env platform=web --progress", "build": "yarn run build:lib && yarn run build:web && yarn run build:umd && yarn run build:umd:min", - "build:lib": "rollup -c", + "build:lib": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", "build:web": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env platform=web --progress", "build:umd": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --progress --config webpack.config.umd.ts", "build:umd:min": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env production --progress --config webpack.config.umd.ts", - "clean": "rimraf build dist umd", + "clean": "rimraf build lib umd", "test": "jest", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", @@ -62,6 +67,7 @@ "socketcluster-client": "^14.3.2" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -69,7 +75,6 @@ "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", "@rjsf/core": "^3.2.1", - "@rollup/plugin-babel": "^5.3.0", "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^12.1.2", "@types/jest": "^27.4.0", @@ -102,13 +107,10 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "style-loader": "^3.3.1", "styled-components": "^5.3.3", "ts-jest": "^27.1.3", "ts-node": "^10.4.0", - "tslib": "^2.3.1", "typescript": "~4.5.5", "webpack": "^5.67.0", "webpack-cli": "^4.9.1", diff --git a/packages/redux-devtools-app/rollup.config.js b/packages/redux-devtools-app/rollup.config.js deleted file mode 100644 index 68b64648..00000000 --- a/packages/redux-devtools-app/rollup.config.js +++ /dev/null @@ -1,54 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.tsx', - output: [ - { - file: 'dist/redux-devtools-app.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-app.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'react-redux', - 'redux', - 'localforage', - /redux-persist/, - '@redux-devtools/ui', - 'socketcluster-client', - 'jsan', - /react-icons/, - 'styled-components', - '@redux-devtools/slider-monitor', - 'prop-types', - /lodash/, - '@redux-devtools/core', - '@redux-devtools/log-monitor', - '@redux-devtools/rtk-query-monitor', - '@redux-devtools/chart-monitor', - '@redux-devtools/inspector-monitor', - '@redux-devtools/inspector-monitor-trace-tab', - '@redux-devtools/inspector-monitor-test-tab', - 'javascript-stringify', - 'jsondiffpatch', - 'd3-state-visualizer', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-app/tsconfig.json b/packages/redux-devtools-app/tsconfig.json index 250eb1a1..bfbbbab0 100644 --- a/packages/redux-devtools-app/tsconfig.json +++ b/packages/redux-devtools-app/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib", + "outDir": "lib/types", "types": ["webpack-env"] }, "include": ["src"] diff --git a/packages/redux-devtools-chart-monitor/.eslintignore b/packages/redux-devtools-chart-monitor/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/redux-devtools-chart-monitor/.eslintignore +++ b/packages/redux-devtools-chart-monitor/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/redux-devtools-chart-monitor/babel.config.esm.json b/packages/redux-devtools-chart-monitor/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-chart-monitor/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-chart-monitor/.babelrc b/packages/redux-devtools-chart-monitor/babel.config.json similarity index 100% rename from packages/redux-devtools-chart-monitor/.babelrc rename to packages/redux-devtools-chart-monitor/babel.config.json diff --git a/packages/redux-devtools-chart-monitor/package.json b/packages/redux-devtools-chart-monitor/package.json index 2358198c..fca1039f 100644 --- a/packages/redux-devtools-chart-monitor/package.json +++ b/packages/redux-devtools-chart-monitor/package.json @@ -16,19 +16,23 @@ "license": "MIT", "author": "romseguy", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-chart-monitor.cjs.js", - "module": "dist/redux-devtools-chart-monitor.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -44,6 +48,7 @@ "redux-devtools-themes": "^1.0.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -51,7 +56,6 @@ "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", "@redux-devtools/core": "^3.10.1", - "@rollup/plugin-babel": "^5.3.0", "@types/react": "^17.0.38", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.10.0", @@ -62,9 +66,6 @@ "react": "^17.0.2", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-chart-monitor/rollup.config.js b/packages/redux-devtools-chart-monitor/rollup.config.js deleted file mode 100644 index df8092dc..00000000 --- a/packages/redux-devtools-chart-monitor/rollup.config.js +++ /dev/null @@ -1,31 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { file: 'dist/redux-devtools-chart-monitor.cjs.js', format: 'cjs' }, - { file: 'dist/redux-devtools-chart-monitor.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - 'redux-devtools-themes', - '@redux-devtools/core', - 'deepmerge', - 'd3-state-visualizer', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-chart-monitor/tsconfig.json b/packages/redux-devtools-chart-monitor/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/redux-devtools-chart-monitor/tsconfig.json +++ b/packages/redux-devtools-chart-monitor/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-dock-monitor/babel.config.esm.json b/packages/redux-devtools-dock-monitor/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-dock-monitor/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-dock-monitor/.babelrc b/packages/redux-devtools-dock-monitor/babel.config.json similarity index 100% rename from packages/redux-devtools-dock-monitor/.babelrc rename to packages/redux-devtools-dock-monitor/babel.config.json diff --git a/packages/redux-devtools-dock-monitor/package.json b/packages/redux-devtools-dock-monitor/package.json index e7290df1..fe277333 100644 --- a/packages/redux-devtools-dock-monitor/package.json +++ b/packages/redux-devtools-dock-monitor/package.json @@ -18,19 +18,23 @@ "license": "MIT", "author": "Dan Abramov (http://github.com/gaearon)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-dock-monitor.cjs.js", - "module": "dist/redux-devtools-dock-monitor.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -44,6 +48,7 @@ "react-dock": "^0.5.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -51,7 +56,6 @@ "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", "@redux-devtools/core": "^3.10.1", - "@rollup/plugin-babel": "^5.3.0", "@types/parse-key": "^0.2.0", "@types/react": "^17.0.38", "@typescript-eslint/eslint-plugin": "^5.10.0", @@ -63,9 +67,6 @@ "react": "^17.0.2", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-dock-monitor/rollup.config.js b/packages/redux-devtools-dock-monitor/rollup.config.js deleted file mode 100644 index 279a80f4..00000000 --- a/packages/redux-devtools-dock-monitor/rollup.config.js +++ /dev/null @@ -1,29 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { file: 'dist/redux-devtools-dock-monitor.cjs.js', format: 'cjs' }, - { file: 'dist/redux-devtools-dock-monitor.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - 'react-dock', - 'parse-key', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-dock-monitor/tsconfig.json b/packages/redux-devtools-dock-monitor/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/redux-devtools-dock-monitor/tsconfig.json +++ b/packages/redux-devtools-dock-monitor/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-extension/.eslintignore b/packages/redux-devtools-extension/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/redux-devtools-extension/.eslintignore +++ b/packages/redux-devtools-extension/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/redux-devtools-extension/babel.config.esm.json b/packages/redux-devtools-extension/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/redux-devtools-extension/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-extension/.babelrc b/packages/redux-devtools-extension/babel.config.json similarity index 100% rename from packages/redux-devtools-extension/.babelrc rename to packages/redux-devtools-extension/babel.config.json diff --git a/packages/redux-devtools-extension/package.json b/packages/redux-devtools-extension/package.json index d52d96e8..63cd4363 100644 --- a/packages/redux-devtools-extension/package.json +++ b/packages/redux-devtools-extension/package.json @@ -9,16 +9,20 @@ "dist", "src" ], - "main": "dist/redux-devtools-extension.cjs.js", - "module": "dist/redux-devtools-extension.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -28,21 +32,18 @@ "@babel/runtime": "^7.16.7" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.10.0", "eslint": "^8.7.0", "eslint-config-prettier": "^8.3.0", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-extension/rollup.config.js b/packages/redux-devtools-extension/rollup.config.js deleted file mode 100644 index 690255de..00000000 --- a/packages/redux-devtools-extension/rollup.config.js +++ /dev/null @@ -1,29 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-extension.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-extension.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [/@babel\/runtime/, 'redux'], - }, -]; - -export default config; diff --git a/packages/redux-devtools-extension/tsconfig.json b/packages/redux-devtools-extension/tsconfig.json index 84575cb5..19e4e718 100644 --- a/packages/redux-devtools-extension/tsconfig.json +++ b/packages/redux-devtools-extension/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-inspector-monitor-test-tab/.eslintignore b/packages/redux-devtools-inspector-monitor-test-tab/.eslintignore index 5df41e2c..d3c23dcb 100644 --- a/packages/redux-devtools-inspector-monitor-test-tab/.eslintignore +++ b/packages/redux-devtools-inspector-monitor-test-tab/.eslintignore @@ -1,2 +1,2 @@ demo -dist +lib diff --git a/packages/redux-devtools-inspector-monitor-test-tab/babel.config.esm.json b/packages/redux-devtools-inspector-monitor-test-tab/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-inspector-monitor-test-tab/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-inspector-monitor-test-tab/.babelrc b/packages/redux-devtools-inspector-monitor-test-tab/babel.config.json similarity index 100% rename from packages/redux-devtools-inspector-monitor-test-tab/.babelrc rename to packages/redux-devtools-inspector-monitor-test-tab/babel.config.json diff --git a/packages/redux-devtools-inspector-monitor-test-tab/package.json b/packages/redux-devtools-inspector-monitor-test-tab/package.json index c9595c7d..9fef8aaa 100644 --- a/packages/redux-devtools-inspector-monitor-test-tab/package.json +++ b/packages/redux-devtools-inspector-monitor-test-tab/package.json @@ -19,19 +19,23 @@ "license": "MIT", "author": "Mihail Diordiev (https://github.com/zalmoxisus)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-inspector-monitor-test-tab.cjs.js", - "module": "dist/redux-devtools-inspector-monitor-test-tab.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", @@ -51,6 +55,7 @@ "simple-diff": "^1.6.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -59,7 +64,6 @@ "@babel/preset-typescript": "^7.16.7", "@redux-devtools/core": "^3.10.1", "@redux-devtools/inspector-monitor": "^2.0.1", - "@rollup/plugin-babel": "^5.3.0", "@testing-library/react": "^12.1.2", "@types/es6template": "^1.0.0", "@types/jest": "^27.4.0", @@ -79,10 +83,7 @@ "react-dom": "^17.0.2", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-inspector-monitor-test-tab/rollup.config.js b/packages/redux-devtools-inspector-monitor-test-tab/rollup.config.js deleted file mode 100644 index 62ddc03e..00000000 --- a/packages/redux-devtools-inspector-monitor-test-tab/rollup.config.js +++ /dev/null @@ -1,40 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.tsx', - output: [ - { - file: 'dist/redux-devtools-inspector-monitor-test-tab.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-inspector-monitor-test-tab.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - '@redux-devtools/ui', - /react-icons/, - 'javascript-stringify', - 'object-path', - 'jsan', - 'simple-diff', - 'es6template', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-inspector-monitor-test-tab/tsconfig.json b/packages/redux-devtools-inspector-monitor-test-tab/tsconfig.json index 5c73f98c..67c88df5 100644 --- a/packages/redux-devtools-inspector-monitor-test-tab/tsconfig.json +++ b/packages/redux-devtools-inspector-monitor-test-tab/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib", + "outDir": "lib/types", "resolveJsonModule": true }, "include": ["src"] diff --git a/packages/redux-devtools-inspector-monitor-trace-tab/.eslintignore b/packages/redux-devtools-inspector-monitor-trace-tab/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/redux-devtools-inspector-monitor-trace-tab/.eslintignore +++ b/packages/redux-devtools-inspector-monitor-trace-tab/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/redux-devtools-inspector-monitor-trace-tab/babel.config.esm.json b/packages/redux-devtools-inspector-monitor-trace-tab/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-inspector-monitor-trace-tab/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-inspector-monitor-trace-tab/.babelrc b/packages/redux-devtools-inspector-monitor-trace-tab/babel.config.json similarity index 100% rename from packages/redux-devtools-inspector-monitor-trace-tab/.babelrc rename to packages/redux-devtools-inspector-monitor-trace-tab/babel.config.json diff --git a/packages/redux-devtools-inspector-monitor-trace-tab/package.json b/packages/redux-devtools-inspector-monitor-trace-tab/package.json index 2ef68008..381a0440 100644 --- a/packages/redux-devtools-inspector-monitor-trace-tab/package.json +++ b/packages/redux-devtools-inspector-monitor-trace-tab/package.json @@ -9,16 +9,20 @@ "Mihail Diordiev (https://github.com/zalmoxisus)" ], "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-inspector-monitor-trace-tab.cjs.js", - "module": "dist/redux-devtools-inspector-monitor-trace-tab.esm.js", - "types": "dist/StackTraceTab.d.ts", + "main": "lib/cjs/StackTraceTab.js", + "module": "lib/esm/StackTraceTab.js", + "types": "lib/types/StackTraceTab.d.ts", + "sideEffects": false, "repository": "https://github.com/reduxjs/redux-devtools", "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", @@ -31,10 +35,12 @@ "@types/chrome": "^0.0.176", "anser": "^2.1.0", "html-entities": "^2.3.2", + "path-browserify": "^1.0.1", "redux-devtools-themes": "^1.0.0", "source-map": "^0.5.7" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -43,12 +49,12 @@ "@babel/preset-typescript": "^7.16.7", "@redux-devtools/core": "^3.10.1", "@redux-devtools/inspector-monitor": "^2.0.1", - "@rollup/plugin-babel": "^5.3.0", "@testing-library/react": "^12.1.2", "@types/babel__code-frame": "^7.0.3", "@types/html-entities": "^1.3.4", "@types/jest": "^27.4.0", "@types/node": "^16.11.21", + "@types/path-browserify": "^1.0.0", "@types/react": "^17.0.38", "@types/redux-devtools-themes": "^1.0.0", "@types/source-map": "0.5.2", @@ -65,11 +71,7 @@ "react-test-renderer": "^17.0.2", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-node-polyfills": "^0.2.1", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-inspector-monitor-trace-tab/src/react-error-overlay/utils/unmapper.ts b/packages/redux-devtools-inspector-monitor-trace-tab/src/react-error-overlay/utils/unmapper.ts index 8ca09346..b86c87f6 100644 --- a/packages/redux-devtools-inspector-monitor-trace-tab/src/react-error-overlay/utils/unmapper.ts +++ b/packages/redux-devtools-inspector-monitor-trace-tab/src/react-error-overlay/utils/unmapper.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import path from 'path'; +import path from 'path-browserify'; import StackFrame from './stack-frame'; import { getSourceMap } from './getSourceMap'; import { getLinesAround } from './getLinesAround'; diff --git a/packages/redux-devtools-inspector-monitor-trace-tab/tsconfig.json b/packages/redux-devtools-inspector-monitor-trace-tab/tsconfig.json index 4f71c334..55dfd4e0 100644 --- a/packages/redux-devtools-inspector-monitor-trace-tab/tsconfig.json +++ b/packages/redux-devtools-inspector-monitor-trace-tab/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib", + "outDir": "lib/types", "types": ["chrome", "node"] }, "include": ["src"] diff --git a/packages/redux-devtools-inspector-monitor/.eslintignore b/packages/redux-devtools-inspector-monitor/.eslintignore index 5df41e2c..d3c23dcb 100644 --- a/packages/redux-devtools-inspector-monitor/.eslintignore +++ b/packages/redux-devtools-inspector-monitor/.eslintignore @@ -1,2 +1,2 @@ demo -dist +lib diff --git a/packages/redux-devtools-inspector-monitor/babel.config.esm.json b/packages/redux-devtools-inspector-monitor/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-inspector-monitor/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-inspector-monitor/.babelrc b/packages/redux-devtools-inspector-monitor/babel.config.json similarity index 100% rename from packages/redux-devtools-inspector-monitor/.babelrc rename to packages/redux-devtools-inspector-monitor/babel.config.json diff --git a/packages/redux-devtools-inspector-monitor/package.json b/packages/redux-devtools-inspector-monitor/package.json index 45264662..b23193ed 100644 --- a/packages/redux-devtools-inspector-monitor/package.json +++ b/packages/redux-devtools-inspector-monitor/package.json @@ -12,19 +12,23 @@ "Mihail Diordiev (https://github.com/zalmoxisus)" ], "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-inspector-monitor.cjs.js", - "module": "dist/redux-devtools-inspector-monitor.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -50,6 +54,7 @@ "redux-devtools-themes": "^1.0.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -57,7 +62,6 @@ "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", "@redux-devtools/core": "^3.10.1", - "@rollup/plugin-babel": "^5.3.0", "@types/dateformat": "^3.0.1", "@types/hex-rgba": "^1.0.1", "@types/history": "^4.7.11", @@ -74,9 +78,6 @@ "react": "^17.0.2", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-inspector-monitor/rollup.config.js b/packages/redux-devtools-inspector-monitor/rollup.config.js deleted file mode 100644 index f094af02..00000000 --- a/packages/redux-devtools-inspector-monitor/rollup.config.js +++ /dev/null @@ -1,40 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { file: 'dist/redux-devtools-inspector-monitor.cjs.js', format: 'cjs' }, - { file: 'dist/redux-devtools-inspector-monitor.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - 'react-base16-styling', - '@redux-devtools/core', - 'jss', - 'jss-preset-default', - 'hex-rgba', - 'redux-devtools-themes', - 'immutable', - 'jsondiffpatch', - 'react-dragula', - 'react-json-tree', - 'dateformat', - 'lodash.debounce', - 'javascript-stringify', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-inspector-monitor/src/index.ts b/packages/redux-devtools-inspector-monitor/src/index.ts index d5f1d5a1..0b0cd949 100644 --- a/packages/redux-devtools-inspector-monitor/src/index.ts +++ b/packages/redux-devtools-inspector-monitor/src/index.ts @@ -1,6 +1,6 @@ export { default as InspectorMonitor } from './DevtoolsInspector'; -export { Tab, TabComponentProps } from './ActionPreview'; -export { DevtoolsInspectorState } from './redux'; +export type { Tab, TabComponentProps } from './ActionPreview'; +export type { DevtoolsInspectorState } from './redux'; export { base16Themes } from './utils/createStylingFromTheme'; export * as inspectorThemes from './themes/index'; export { default as ActionTab } from './tabs/ActionTab'; diff --git a/packages/redux-devtools-inspector-monitor/tsconfig.json b/packages/redux-devtools-inspector-monitor/tsconfig.json index 5c73f98c..67c88df5 100644 --- a/packages/redux-devtools-inspector-monitor/tsconfig.json +++ b/packages/redux-devtools-inspector-monitor/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib", + "outDir": "lib/types", "resolveJsonModule": true }, "include": ["src"] diff --git a/packages/redux-devtools-instrument/.eslintignore b/packages/redux-devtools-instrument/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/redux-devtools-instrument/.eslintignore +++ b/packages/redux-devtools-instrument/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/redux-devtools-instrument/babel.config.esm.json b/packages/redux-devtools-instrument/babel.config.esm.json new file mode 100644 index 00000000..7acf8156 --- /dev/null +++ b/packages/redux-devtools-instrument/babel.config.esm.json @@ -0,0 +1,6 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ] +} diff --git a/packages/redux-devtools-instrument/.babelrc b/packages/redux-devtools-instrument/babel.config.json similarity index 100% rename from packages/redux-devtools-instrument/.babelrc rename to packages/redux-devtools-instrument/babel.config.json diff --git a/packages/redux-devtools-instrument/package.json b/packages/redux-devtools-instrument/package.json index 07a22b12..924328da 100644 --- a/packages/redux-devtools-instrument/package.json +++ b/packages/redux-devtools-instrument/package.json @@ -17,19 +17,23 @@ "license": "MIT", "author": "Dan Abramov (http://github.com/gaearon)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-instrument.cjs.js", - "module": "dist/redux-devtools-instrument.esm.js", - "types": "dist/instrument.d.ts", + "main": "lib/cjs/instrument.js", + "module": "lib/esm/instrument.js", + "types": "lib/types/instrument.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", @@ -41,12 +45,12 @@ "lodash": "^4.17.21" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@types/jest": "^27.4.0", "@types/lodash": "^4.14.178", "@types/node": "^16.11.21", @@ -58,11 +62,8 @@ "jest": "^27.4.7", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "rxjs": "^7.5.2", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-instrument/rollup.config.js b/packages/redux-devtools-instrument/rollup.config.js deleted file mode 100644 index 8124bab0..00000000 --- a/packages/redux-devtools-instrument/rollup.config.js +++ /dev/null @@ -1,23 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/instrument.ts', - output: [ - { file: 'dist/redux-devtools-instrument.cjs.js', format: 'cjs' }, - { file: 'dist/redux-devtools-instrument.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [/@babel\/runtime/, /lodash/], - }, -]; - -export default config; diff --git a/packages/redux-devtools-instrument/tsconfig.json b/packages/redux-devtools-instrument/tsconfig.json index 95bce764..c4576395 100644 --- a/packages/redux-devtools-instrument/tsconfig.json +++ b/packages/redux-devtools-instrument/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "lib", + "outDir": "lib/types", "types": ["node"] }, "include": ["src"] diff --git a/packages/redux-devtools-log-monitor/.eslintignore b/packages/redux-devtools-log-monitor/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/redux-devtools-log-monitor/.eslintignore +++ b/packages/redux-devtools-log-monitor/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/redux-devtools-log-monitor/babel.config.esm.json b/packages/redux-devtools-log-monitor/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-log-monitor/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-log-monitor/.babelrc b/packages/redux-devtools-log-monitor/babel.config.json similarity index 100% rename from packages/redux-devtools-log-monitor/.babelrc rename to packages/redux-devtools-log-monitor/babel.config.json diff --git a/packages/redux-devtools-log-monitor/package.json b/packages/redux-devtools-log-monitor/package.json index 94f33d96..fbd06703 100644 --- a/packages/redux-devtools-log-monitor/package.json +++ b/packages/redux-devtools-log-monitor/package.json @@ -18,19 +18,23 @@ "license": "MIT", "author": "Dan Abramov (http://github.com/gaearon)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-log-monitor.cjs.js", - "module": "dist/redux-devtools-log-monitor.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -47,6 +51,7 @@ "redux-devtools-themes": "^1.0.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -54,7 +59,6 @@ "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", "@redux-devtools/core": "^3.10.1", - "@rollup/plugin-babel": "^5.3.0", "@types/react": "^17.0.38", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.10.0", @@ -65,9 +69,6 @@ "react": "^17.0.2", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-log-monitor/rollup.config.js b/packages/redux-devtools-log-monitor/rollup.config.js deleted file mode 100644 index f58a343a..00000000 --- a/packages/redux-devtools-log-monitor/rollup.config.js +++ /dev/null @@ -1,37 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-log-monitor.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-log-monitor.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - 'redux-devtools-themes', - '@redux-devtools/core', - 'lodash.debounce', - 'react-json-tree', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-log-monitor/tsconfig.json b/packages/redux-devtools-log-monitor/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/redux-devtools-log-monitor/tsconfig.json +++ b/packages/redux-devtools-log-monitor/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-remote/.eslintignore b/packages/redux-devtools-remote/.eslintignore index 4d6880d3..be897dba 100644 --- a/packages/redux-devtools-remote/.eslintignore +++ b/packages/redux-devtools-remote/.eslintignore @@ -1,2 +1,2 @@ -dist examples +lib diff --git a/packages/redux-devtools-remote/babel.config.esm.json b/packages/redux-devtools-remote/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/redux-devtools-remote/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-remote/.babelrc b/packages/redux-devtools-remote/babel.config.json similarity index 100% rename from packages/redux-devtools-remote/.babelrc rename to packages/redux-devtools-remote/babel.config.json diff --git a/packages/redux-devtools-remote/package.json b/packages/redux-devtools-remote/package.json index 681cf0bd..8575c904 100644 --- a/packages/redux-devtools-remote/package.json +++ b/packages/redux-devtools-remote/package.json @@ -18,19 +18,23 @@ "license": "MIT", "author": "Mihail Diordiev (https://github.com/zalmoxisus)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-remote.cjs.js", - "module": "dist/redux-devtools-remote.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -46,13 +50,12 @@ "socketcluster-client": "^14.3.2" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", - "@rollup/plugin-commonjs": "^21.0.1", "@types/jsan": "^3.1.2", "@types/socketcluster-client": "^13.0.5", "@typescript-eslint/eslint-plugin": "^5.10.0", @@ -61,9 +64,6 @@ "eslint-config-prettier": "^8.3.0", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-remote/rollup.config.js b/packages/redux-devtools-remote/rollup.config.js deleted file mode 100644 index b3e4326a..00000000 --- a/packages/redux-devtools-remote/rollup.config.js +++ /dev/null @@ -1,36 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-remote.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-remote.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'jsan', - 'socketcluster-client', - '@redux-devtools/utils', - '@redux-devtools/instrument', - 'rn-host-detect', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-remote/tsconfig.json b/packages/redux-devtools-remote/tsconfig.json index 84575cb5..19e4e718 100644 --- a/packages/redux-devtools-remote/tsconfig.json +++ b/packages/redux-devtools-remote/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-rtk-query-monitor/.eslintignore b/packages/redux-devtools-rtk-query-monitor/.eslintignore index 5df41e2c..d3c23dcb 100644 --- a/packages/redux-devtools-rtk-query-monitor/.eslintignore +++ b/packages/redux-devtools-rtk-query-monitor/.eslintignore @@ -1,2 +1,2 @@ demo -dist +lib diff --git a/packages/redux-devtools-rtk-query-monitor/babel.config.esm.json b/packages/redux-devtools-rtk-query-monitor/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-rtk-query-monitor/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-rtk-query-monitor/.babelrc b/packages/redux-devtools-rtk-query-monitor/babel.config.json similarity index 100% rename from packages/redux-devtools-rtk-query-monitor/.babelrc rename to packages/redux-devtools-rtk-query-monitor/babel.config.json diff --git a/packages/redux-devtools-rtk-query-monitor/package.json b/packages/redux-devtools-rtk-query-monitor/package.json index 372c75f4..922a480e 100644 --- a/packages/redux-devtools-rtk-query-monitor/package.json +++ b/packages/redux-devtools-rtk-query-monitor/package.json @@ -20,19 +20,23 @@ "url": "https://github.com/FaberVitale" }, "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-rtk-query-monitor.cjs.js", - "module": "dist/redux-devtools-rtk-query-monitor.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -54,6 +58,7 @@ "redux-devtools-themes": "^1.0.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", @@ -62,7 +67,6 @@ "@babel/preset-typescript": "^7.16.7", "@redux-devtools/core": "^3.10.1", "@reduxjs/toolkit": "^1.7.1", - "@rollup/plugin-babel": "^5.3.0", "@types/hex-rgba": "^1.0.1", "@types/lodash.debounce": "^4.0.6", "@types/react": "^17.0.38", @@ -75,9 +79,6 @@ "react": "^17.0.2", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-rtk-query-monitor/rollup.config.js b/packages/redux-devtools-rtk-query-monitor/rollup.config.js deleted file mode 100644 index 48489878..00000000 --- a/packages/redux-devtools-rtk-query-monitor/rollup.config.js +++ /dev/null @@ -1,43 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-rtk-query-monitor.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-rtk-query-monitor.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - /@reduxjs\/toolkit/, - 'jss', - 'jss-preset-default', - 'react-base16-styling', - 'hex-rgba', - 'redux-devtools-themes', - '@redux-devtools/ui', - 'lodash.debounce', - 'immutable', - 'react-json-tree', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-rtk-query-monitor/tsconfig.json b/packages/redux-devtools-rtk-query-monitor/tsconfig.json index 5c73f98c..67c88df5 100644 --- a/packages/redux-devtools-rtk-query-monitor/tsconfig.json +++ b/packages/redux-devtools-rtk-query-monitor/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib", + "outDir": "lib/types", "resolveJsonModule": true }, "include": ["src"] diff --git a/packages/redux-devtools-serialize/.eslintignore b/packages/redux-devtools-serialize/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/redux-devtools-serialize/.eslintignore +++ b/packages/redux-devtools-serialize/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/redux-devtools-serialize/babel.config.esm.json b/packages/redux-devtools-serialize/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/redux-devtools-serialize/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-serialize/.babelrc b/packages/redux-devtools-serialize/babel.config.json similarity index 100% rename from packages/redux-devtools-serialize/.babelrc rename to packages/redux-devtools-serialize/babel.config.json diff --git a/packages/redux-devtools-serialize/package.json b/packages/redux-devtools-serialize/package.json index f3aae7ff..154c6cb7 100644 --- a/packages/redux-devtools-serialize/package.json +++ b/packages/redux-devtools-serialize/package.json @@ -13,19 +13,23 @@ "license": "MIT", "author": "Mihail Diordiev (https://github.com/zalmoxisus)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-serialize.cjs.js", - "module": "dist/redux-devtools-serialize.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", @@ -37,12 +41,12 @@ "jsan": "^3.1.14" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@types/jest": "^27.4.0", "@types/jsan": "^3.1.2", "@typescript-eslint/eslint-plugin": "^5.10.0", @@ -53,10 +57,7 @@ "immutable": "^4.0.0", "jest": "^27.4.7", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-serialize/rollup.config.js b/packages/redux-devtools-serialize/rollup.config.js deleted file mode 100644 index 28ac25ee..00000000 --- a/packages/redux-devtools-serialize/rollup.config.js +++ /dev/null @@ -1,29 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-serialize.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-serialize.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [/@babel\/runtime/, 'jsan'], - }, -]; - -export default config; diff --git a/packages/redux-devtools-serialize/tsconfig.json b/packages/redux-devtools-serialize/tsconfig.json index 84575cb5..19e4e718 100644 --- a/packages/redux-devtools-serialize/tsconfig.json +++ b/packages/redux-devtools-serialize/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-slider-monitor/.eslintignore b/packages/redux-devtools-slider-monitor/.eslintignore index 4d6880d3..be897dba 100644 --- a/packages/redux-devtools-slider-monitor/.eslintignore +++ b/packages/redux-devtools-slider-monitor/.eslintignore @@ -1,2 +1,2 @@ -dist examples +lib diff --git a/packages/redux-devtools-slider-monitor/babel.config.esm.json b/packages/redux-devtools-slider-monitor/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-slider-monitor/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-slider-monitor/.babelrc b/packages/redux-devtools-slider-monitor/babel.config.json similarity index 100% rename from packages/redux-devtools-slider-monitor/.babelrc rename to packages/redux-devtools-slider-monitor/babel.config.json diff --git a/packages/redux-devtools-slider-monitor/package.json b/packages/redux-devtools-slider-monitor/package.json index 27c60499..cee84b75 100644 --- a/packages/redux-devtools-slider-monitor/package.json +++ b/packages/redux-devtools-slider-monitor/package.json @@ -9,19 +9,23 @@ "license": "MIT", "author": "Cale Newman (http://github.com/calesce)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-slider-monitor.cjs.js", - "module": "dist/redux-devtools-slider-monitor.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -36,6 +40,7 @@ "redux-devtools-themes": "^1.0.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", diff --git a/packages/redux-devtools-slider-monitor/rollup.config.js b/packages/redux-devtools-slider-monitor/rollup.config.js deleted file mode 100644 index aa29c0c2..00000000 --- a/packages/redux-devtools-slider-monitor/rollup.config.js +++ /dev/null @@ -1,36 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-slider-monitor.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-slider-monitor.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'react', - 'prop-types', - 'redux-devtools-themes', - '@redux-devtools/core', - '@redux-devtools/ui', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-slider-monitor/tsconfig.json b/packages/redux-devtools-slider-monitor/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/redux-devtools-slider-monitor/tsconfig.json +++ b/packages/redux-devtools-slider-monitor/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-ui/.babelrc b/packages/redux-devtools-ui/.babelrc.json similarity index 100% rename from packages/redux-devtools-ui/.babelrc rename to packages/redux-devtools-ui/.babelrc.json diff --git a/packages/redux-devtools-ui/.eslintignore b/packages/redux-devtools-ui/.eslintignore index b448b494..232c27de 100644 --- a/packages/redux-devtools-ui/.eslintignore +++ b/packages/redux-devtools-ui/.eslintignore @@ -1,2 +1,2 @@ -dist +lib storybook-static diff --git a/packages/redux-devtools-ui/babel.config.esm.json b/packages/redux-devtools-ui/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools-ui/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-ui/package.json b/packages/redux-devtools-ui/package.json index 56671a1a..82b2ddb4 100644 --- a/packages/redux-devtools-ui/package.json +++ b/packages/redux-devtools-ui/package.json @@ -9,13 +9,14 @@ "license": "MIT", "author": "Mihail Diordiev (https://github.com/zalmoxisus)", "files": [ - "dist", "fonts", + "lib", "src" ], - "main": "dist/redux-devtools-ui.cjs.js", - "module": "dist/redux-devtools-ui.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" @@ -23,10 +24,14 @@ "scripts": { "start": "yarn run storybook", "storybook": "start-storybook -p 6006 -s ./fonts", - "build-storybook": "build-storybook -s ./fonts", - "build": "yarn run build:lib && yarn run build-storybook", - "build:lib": "rollup -c", - "clean": "rimraf dist storybook-static", + "build:storybook": "build-storybook -s ./fonts", + "build": "yarn run build:lib && yarn run build:storybook", + "build:lib": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:css", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "build:css": "ncp fonts lib/fonts", + "clean": "rimraf lib storybook-static", "test": "jest", "lint": "eslint . --ext .ts,.tsx", "lint:css": "stylelint \"./src/**/*.js\"", @@ -53,13 +58,13 @@ "simple-element-resize-detector": "^1.3.0" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@storybook/addon-essentials": "^6.4.14", "@storybook/react": "^6.4.14", "@testing-library/dom": "^8.11.2", @@ -79,12 +84,11 @@ "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0", "jest": "^27.4.7", + "ncp": "^2.0.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-is": "^17.0.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "styled-components": "^5.3.3", "stylelint": "^14.2.0", "stylelint-config-prettier": "^9.0.3", @@ -92,7 +96,6 @@ "stylelint-config-styled-components": "^0.1.1", "stylelint-processor-styled-components": "^1.10.0", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5", "webpack": "^5.67.0" }, diff --git a/packages/redux-devtools-ui/rollup.config.js b/packages/redux-devtools-ui/rollup.config.js deleted file mode 100644 index fb215be8..00000000 --- a/packages/redux-devtools-ui/rollup.config.js +++ /dev/null @@ -1,43 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-ui.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-ui.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - /\.css/, - 'react', - 'prop-types', - 'styled-components', - 'color', - 'redux-devtools-themes', - 'base16', - '@rjsf/core', - /codemirror/, - 'react-select', - /react-icons/, - 'simple-element-resize-detector', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-ui/src/Tabs/index.ts b/packages/redux-devtools-ui/src/Tabs/index.ts index f58f9e2c..2fcb2e87 100644 --- a/packages/redux-devtools-ui/src/Tabs/index.ts +++ b/packages/redux-devtools-ui/src/Tabs/index.ts @@ -1,2 +1,2 @@ export { default } from './Tabs'; -export { Tab } from './TabsHeader'; +export type { Tab } from './TabsHeader'; diff --git a/packages/redux-devtools-ui/src/index.ts b/packages/redux-devtools-ui/src/index.ts index 87fe24c6..fdfad8bd 100644 --- a/packages/redux-devtools-ui/src/index.ts +++ b/packages/redux-devtools-ui/src/index.ts @@ -6,7 +6,7 @@ export { default as Editor } from './Editor'; export { default as Form } from './Form'; export { default as Select } from './Select'; export { default as Slider } from './Slider'; -export { default as Tabs, Tab } from './Tabs'; +export { default as Tabs, type Tab } from './Tabs'; export { default as SegmentedControl } from './SegmentedControl'; export { default as Notification } from './Notification'; export * from './Toolbar'; @@ -17,8 +17,8 @@ export { default as createStyledComponent } from './utils/createStyledComponent' export { listSchemes, listThemes, - ThemeName, - ThemeFromProvider, - SchemeName, + type ThemeName, + type ThemeFromProvider, + type SchemeName, } from './utils/theme'; -export { Theme } from './themes/default'; +export type { Theme } from './themes/default'; diff --git a/packages/redux-devtools-ui/tsconfig.json b/packages/redux-devtools-ui/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/redux-devtools-ui/tsconfig.json +++ b/packages/redux-devtools-ui/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/packages/redux-devtools-utils/.eslintignore b/packages/redux-devtools-utils/.eslintignore index 1521c8b7..a65b4177 100644 --- a/packages/redux-devtools-utils/.eslintignore +++ b/packages/redux-devtools-utils/.eslintignore @@ -1 +1 @@ -dist +lib diff --git a/packages/redux-devtools-utils/babel.config.esm.json b/packages/redux-devtools-utils/babel.config.esm.json new file mode 100644 index 00000000..1c02687e --- /dev/null +++ b/packages/redux-devtools-utils/babel.config.esm.json @@ -0,0 +1,7 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools-utils/.babelrc b/packages/redux-devtools-utils/babel.config.json similarity index 100% rename from packages/redux-devtools-utils/.babelrc rename to packages/redux-devtools-utils/babel.config.json diff --git a/packages/redux-devtools-utils/package.json b/packages/redux-devtools-utils/package.json index a3d5d4f4..954c3173 100644 --- a/packages/redux-devtools-utils/package.json +++ b/packages/redux-devtools-utils/package.json @@ -9,19 +9,23 @@ "license": "MIT", "author": "Mihail Diordiev (https://github.com/zalmoxisus)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools-utils.cjs.js", - "module": "dist/redux-devtools-utils.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "lint": "eslint . --ext .ts", "type-check": "tsc --noEmit", "prepack": "yarn run clean && yarn run build", @@ -40,12 +44,12 @@ "redux": "^4.1.2" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@types/jsan": "^3.1.2", "@types/lodash": "^4.14.178", "@types/node": "^16.11.21", @@ -54,9 +58,6 @@ "eslint": "^8.7.0", "eslint-config-prettier": "^8.3.0", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools-utils/rollup.config.js b/packages/redux-devtools-utils/rollup.config.js deleted file mode 100644 index b12234e1..00000000 --- a/packages/redux-devtools-utils/rollup.config.js +++ /dev/null @@ -1,36 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { - file: 'dist/redux-devtools-utils.cjs.js', - format: 'cjs', - }, - { - file: 'dist/redux-devtools-utils.esm.js', - format: 'esm', - }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - 'get-params', - 'jsan', - /nanoid/, - '@redux-devtools/serialize', - /lodash/, - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools-utils/tsconfig.json b/packages/redux-devtools-utils/tsconfig.json index 1834db61..48091635 100644 --- a/packages/redux-devtools-utils/tsconfig.json +++ b/packages/redux-devtools-utils/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib", + "outDir": "lib/types", "types": ["node"] }, "include": ["src"] diff --git a/packages/redux-devtools/.eslintignore b/packages/redux-devtools/.eslintignore index 4d6880d3..be897dba 100644 --- a/packages/redux-devtools/.eslintignore +++ b/packages/redux-devtools/.eslintignore @@ -1,2 +1,2 @@ -dist examples +lib diff --git a/packages/redux-devtools/babel.config.esm.json b/packages/redux-devtools/babel.config.esm.json new file mode 100644 index 00000000..d616aff2 --- /dev/null +++ b/packages/redux-devtools/babel.config.esm.json @@ -0,0 +1,8 @@ +{ + "presets": [ + ["@babel/preset-env", { "targets": "defaults", "modules": false }], + "@babel/preset-react", + "@babel/preset-typescript" + ], + "plugins": ["@babel/plugin-transform-runtime"] +} diff --git a/packages/redux-devtools/.babelrc b/packages/redux-devtools/babel.config.json similarity index 100% rename from packages/redux-devtools/.babelrc rename to packages/redux-devtools/babel.config.json diff --git a/packages/redux-devtools/package.json b/packages/redux-devtools/package.json index fbcca1ab..9ceda9eb 100644 --- a/packages/redux-devtools/package.json +++ b/packages/redux-devtools/package.json @@ -17,19 +17,23 @@ "license": "MIT", "author": "Dan Abramov (http://github.com/gaearon)", "files": [ - "dist", + "lib", "src" ], - "main": "dist/redux-devtools.cjs.js", - "module": "dist/redux-devtools.esm.js", - "types": "dist/index.d.ts", + "main": "lib/cjs/index.js", + "module": "lib/esm/index.js", + "types": "lib/types/index.d.ts", + "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/reduxjs/redux-devtools.git" }, "scripts": { - "build": "rollup -c", - "clean": "rimraf dist", + "build": "yarn build:cjs && yarn build:esm && yarn build:types", + "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs", + "build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm", + "build:types": "tsc --emitDeclarationOnly", + "clean": "rimraf lib", "test": "jest", "lint": "eslint . --ext .ts,.tsx", "type-check": "tsc --noEmit", @@ -44,13 +48,13 @@ "prop-types": "^15.8.1" }, "devDependencies": { + "@babel/cli": "^7.16.8", "@babel/core": "^7.16.12", "@babel/eslint-parser": "^7.16.5", "@babel/plugin-transform-runtime": "^7.16.10", "@babel/preset-env": "^7.16.11", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", - "@rollup/plugin-babel": "^5.3.0", "@types/jest": "^27.4.0", "@types/lodash": "^4.14.178", "@types/node": "^16.11.21", @@ -69,10 +73,7 @@ "react-redux": "^7.2.6", "redux": "^4.1.2", "rimraf": "^3.0.2", - "rollup": "^2.66.0", - "rollup-plugin-typescript2": "^0.31.1", "ts-jest": "^27.1.3", - "tslib": "^2.3.1", "typescript": "~4.5.5" }, "peerDependencies": { diff --git a/packages/redux-devtools/rollup.config.js b/packages/redux-devtools/rollup.config.js deleted file mode 100644 index 9db783f1..00000000 --- a/packages/redux-devtools/rollup.config.js +++ /dev/null @@ -1,30 +0,0 @@ -import typescript from 'rollup-plugin-typescript2'; -import babel from '@rollup/plugin-babel'; - -const config = [ - { - input: 'src/index.ts', - output: [ - { file: 'dist/redux-devtools.cjs.js', format: 'cjs' }, - { file: 'dist/redux-devtools.esm.js', format: 'esm' }, - ], - plugins: [ - typescript(), - babel({ - babelHelpers: 'runtime', - extensions: ['.ts', '.tsx'], - plugins: ['@babel/plugin-transform-runtime'], - }), - ], - external: [ - /@babel\/runtime/, - '@redux-devtools/instrument', - /lodash/, - 'react', - 'prop-types', - 'react-redux', - ], - }, -]; - -export default config; diff --git a/packages/redux-devtools/src/index.ts b/packages/redux-devtools/src/index.ts index edb1c45b..d5d6674a 100644 --- a/packages/redux-devtools/src/index.ts +++ b/packages/redux-devtools/src/index.ts @@ -2,9 +2,9 @@ export { instrument, ActionCreators, ActionTypes, - PerformAction, - LiftedAction, - LiftedState, + type PerformAction, + type LiftedAction, + type LiftedState, } from '@redux-devtools/instrument'; export { default as persistState } from './persistState'; -export { default as createDevTools, Monitor } from './createDevTools'; +export { default as createDevTools, type Monitor } from './createDevTools'; diff --git a/packages/redux-devtools/tsconfig.json b/packages/redux-devtools/tsconfig.json index 7b7d1492..0aade49a 100644 --- a/packages/redux-devtools/tsconfig.json +++ b/packages/redux-devtools/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.react.base.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib/types" }, "include": ["src"] } diff --git a/yarn.lock b/yarn.lock index 89389665..fbe5c02e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -45,6 +45,33 @@ __metadata: languageName: node linkType: hard +"@babel/cli@npm:^7.16.8": + version: 7.16.8 + resolution: "@babel/cli@npm:7.16.8" + dependencies: + "@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3 + chokidar: ^3.4.0 + commander: ^4.0.1 + convert-source-map: ^1.1.0 + fs-readdir-recursive: ^1.1.0 + glob: ^7.0.0 + make-dir: ^2.1.0 + slash: ^2.0.0 + source-map: ^0.5.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + dependenciesMeta: + "@nicolo-ribaudo/chokidar-2": + optional: true + chokidar: + optional: true + bin: + babel: ./bin/babel.js + babel-external-helpers: ./bin/babel-external-helpers.js + checksum: bb0cf50ff502a30e92918cf644192351023a9ef615acc3e7774abbd0327948d93e58ab3a8d31f52c18e2f04df8af10186b89421c28f4f0a2eee6b1ddce17a8ef + languageName: node + linkType: hard + "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.5.5, @babel/code-frame@npm:^7.8.3": version: 7.16.7 resolution: "@babel/code-frame@npm:7.16.7" @@ -4055,6 +4082,13 @@ __metadata: languageName: node linkType: hard +"@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.3": + version: 2.1.8-no-fsevents.3 + resolution: "@nicolo-ribaudo/chokidar-2@npm:2.1.8-no-fsevents.3" + checksum: ee55cc9241aeea7eb94b8a8551bfa4246c56c53bc71ecda0a2104018fcc328ba5723b33686bdf9cc65d4df4ae65e8016b89e0bbdeb94e0309fe91bb9ced42344 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -4493,6 +4527,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/app@workspace:packages/redux-devtools-app" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -4511,7 +4546,6 @@ __metadata: "@redux-devtools/ui": ^1.1.1 "@reduxjs/toolkit": ^1.7.1 "@rjsf/core": ^3.2.1 - "@rollup/plugin-babel": ^5.3.0 "@testing-library/jest-dom": ^5.16.1 "@testing-library/react": ^12.1.2 "@types/jest": ^27.4.0 @@ -4557,14 +4591,11 @@ __metadata: redux: ^4.1.2 redux-persist: ^6.0.0 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 socketcluster-client: ^14.3.2 style-loader: ^3.3.1 styled-components: ^5.3.3 ts-jest: ^27.1.3 ts-node: ^10.4.0 - tslib: ^2.3.1 typescript: ~4.5.5 webpack: ^5.67.0 webpack-cli: ^4.9.1 @@ -4581,6 +4612,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/chart-monitor@workspace:packages/redux-devtools-chart-monitor" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -4589,7 +4621,6 @@ __metadata: "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 "@redux-devtools/core": ^3.10.1 - "@rollup/plugin-babel": ^5.3.0 "@types/prop-types": ^15.7.4 "@types/react": ^17.0.38 "@types/redux-devtools-themes": ^1.0.0 @@ -4606,9 +4637,6 @@ __metadata: redux: ^4.1.2 redux-devtools-themes: ^1.0.0 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/core": ^3.7.0 @@ -4682,6 +4710,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/core@workspace:packages/redux-devtools" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -4690,7 +4719,6 @@ __metadata: "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 "@redux-devtools/instrument": ^2.0.1 - "@rollup/plugin-babel": ^5.3.0 "@types/jest": ^27.4.0 "@types/lodash": ^4.14.178 "@types/node": ^16.11.21 @@ -4712,10 +4740,7 @@ __metadata: react-redux: ^7.2.6 redux: ^4.1.2 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: react: ^0.14.9 || ^15.3.0 || ^16.0.0 || ^17.0.0 @@ -4728,6 +4753,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/dock-monitor@workspace:packages/redux-devtools-dock-monitor" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -4736,7 +4762,6 @@ __metadata: "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 "@redux-devtools/core": ^3.10.1 - "@rollup/plugin-babel": ^5.3.0 "@types/parse-key": ^0.2.0 "@types/prop-types": ^15.7.4 "@types/react": ^17.0.38 @@ -4752,9 +4777,6 @@ __metadata: react-dock: ^0.5.0 redux: ^4.1.2 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/core": ^3.7.0 @@ -4768,22 +4790,19 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/extension@workspace:packages/redux-devtools-extension" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 "@babel/preset-env": ^7.16.11 "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 - "@rollup/plugin-babel": ^5.3.0 "@typescript-eslint/eslint-plugin": ^5.10.0 "@typescript-eslint/parser": ^5.10.0 eslint: ^8.7.0 eslint-config-prettier: ^8.3.0 redux: ^4.1.2 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: redux: ^3.1.0 || ^4.0.0 @@ -4794,6 +4813,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/inspector-monitor-test-tab@workspace:packages/redux-devtools-inspector-monitor-test-tab" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -4804,7 +4824,6 @@ __metadata: "@redux-devtools/core": ^3.10.1 "@redux-devtools/inspector-monitor": ^2.0.1 "@redux-devtools/ui": ^1.1.1 - "@rollup/plugin-babel": ^5.3.0 "@testing-library/react": ^12.1.2 "@types/es6template": ^1.0.0 "@types/jest": ^27.4.0 @@ -4831,11 +4850,8 @@ __metadata: react-icons: ^4.3.1 redux: ^4.1.2 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 simple-diff: ^1.6.0 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/inspector-monitor": ^2.0.0 @@ -4851,6 +4867,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/inspector-monitor-trace-tab@workspace:packages/redux-devtools-inspector-monitor-trace-tab" dependencies: + "@babel/cli": ^7.16.8 "@babel/code-frame": ^7.16.7 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 @@ -4861,13 +4878,13 @@ __metadata: "@babel/runtime": ^7.16.7 "@redux-devtools/core": ^3.10.1 "@redux-devtools/inspector-monitor": ^2.0.1 - "@rollup/plugin-babel": ^5.3.0 "@testing-library/react": ^12.1.2 "@types/babel__code-frame": ^7.0.3 "@types/chrome": ^0.0.176 "@types/html-entities": ^1.3.4 "@types/jest": ^27.4.0 "@types/node": ^16.11.21 + "@types/path-browserify": ^1.0.0 "@types/react": ^17.0.38 "@types/redux-devtools-themes": ^1.0.0 "@types/source-map": 0.5.2 @@ -4881,18 +4898,15 @@ __metadata: eslint-plugin-react-hooks: ^4.3.0 html-entities: ^2.3.2 jest: ^27.4.7 + path-browserify: ^1.0.1 react: ^17.0.2 react-dom: ^17.0.2 react-test-renderer: ^17.0.2 redux: ^4.1.2 redux-devtools-themes: ^1.0.0 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-node-polyfills: ^0.2.1 - rollup-plugin-typescript2: ^0.31.1 source-map: ^0.5.7 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/inspector-monitor": ^2.0.0 @@ -4906,6 +4920,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/inspector-monitor@workspace:packages/redux-devtools-inspector-monitor" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -4914,7 +4929,6 @@ __metadata: "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 "@redux-devtools/core": ^3.10.1 - "@rollup/plugin-babel": ^5.3.0 "@types/dateformat": ^3.0.1 "@types/dragula": ^3.7.1 "@types/hex-rgba": ^1.0.1 @@ -4947,9 +4961,6 @@ __metadata: redux: ^4.1.2 redux-devtools-themes: ^1.0.0 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/core": ^3.7.0 @@ -4963,13 +4974,13 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/instrument@workspace:packages/redux-devtools-instrument" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 "@babel/preset-env": ^7.16.11 "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 - "@rollup/plugin-babel": ^5.3.0 "@types/jest": ^27.4.0 "@types/lodash": ^4.14.178 "@types/node": ^16.11.21 @@ -4982,11 +4993,8 @@ __metadata: lodash: ^4.17.21 redux: ^4.1.2 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 rxjs: ^7.5.2 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: redux: ^3.4.0 || ^4.0.0 @@ -4997,6 +5005,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/log-monitor@workspace:packages/redux-devtools-log-monitor" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -5005,7 +5014,6 @@ __metadata: "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 "@redux-devtools/core": ^3.10.1 - "@rollup/plugin-babel": ^5.3.0 "@types/lodash.debounce": ^4.0.6 "@types/prop-types": ^15.7.4 "@types/react": ^17.0.38 @@ -5023,9 +5031,6 @@ __metadata: redux: ^4.1.2 redux-devtools-themes: ^1.0.0 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/core": ^3.7.0 @@ -5039,6 +5044,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/remote@workspace:packages/redux-devtools-remote" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -5047,8 +5053,6 @@ __metadata: "@babel/runtime": ^7.16.7 "@redux-devtools/instrument": ^2.0.1 "@redux-devtools/utils": ^1.1.1 - "@rollup/plugin-babel": ^5.3.0 - "@rollup/plugin-commonjs": ^21.0.1 "@types/jsan": ^3.1.2 "@types/socketcluster-client": ^13.0.5 "@typescript-eslint/eslint-plugin": ^5.10.0 @@ -5060,10 +5064,7 @@ __metadata: redux: ^4.1.2 rimraf: ^3.0.2 rn-host-detect: ^1.2.0 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 socketcluster-client: ^14.3.2 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: redux: ^3.5.2 || ^4.0.0 @@ -5074,6 +5075,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/rtk-query-monitor@workspace:packages/redux-devtools-rtk-query-monitor" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -5084,7 +5086,6 @@ __metadata: "@redux-devtools/core": ^3.10.1 "@redux-devtools/ui": ^1.1.1 "@reduxjs/toolkit": ^1.7.1 - "@rollup/plugin-babel": ^5.3.0 "@types/hex-rgba": ^1.0.1 "@types/lodash.debounce": ^4.0.6 "@types/prop-types": ^15.7.4 @@ -5108,9 +5109,6 @@ __metadata: redux: ^4.1.2 redux-devtools-themes: ^1.0.0 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/core": ^3.7.0 @@ -5127,13 +5125,13 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/serialize@workspace:packages/redux-devtools-serialize" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 "@babel/preset-env": ^7.16.11 "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 - "@rollup/plugin-babel": ^5.3.0 "@types/jest": ^27.4.0 "@types/jsan": ^3.1.2 "@typescript-eslint/eslint-plugin": ^5.10.0 @@ -5145,10 +5143,7 @@ __metadata: jest: ^27.4.7 jsan: ^3.1.14 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: immutable: ^4.0.0 @@ -5159,6 +5154,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/slider-monitor@workspace:packages/redux-devtools-slider-monitor" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -5201,6 +5197,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/ui@workspace:packages/redux-devtools-ui" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -5209,7 +5206,6 @@ __metadata: "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 "@rjsf/core": ^3.2.1 - "@rollup/plugin-babel": ^5.3.0 "@storybook/addon-essentials": ^6.4.14 "@storybook/react": ^6.4.14 "@testing-library/dom": ^8.11.2 @@ -5238,6 +5234,7 @@ __metadata: eslint-plugin-react: ^7.28.0 eslint-plugin-react-hooks: ^4.3.0 jest: ^27.4.7 + ncp: ^2.0.0 prop-types: ^15.8.1 react: ^17.0.2 react-dom: ^17.0.2 @@ -5246,8 +5243,6 @@ __metadata: react-select: ^5.2.2 redux-devtools-themes: ^1.0.0 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 simple-element-resize-detector: ^1.3.0 styled-components: ^5.3.3 stylelint: ^14.2.0 @@ -5256,7 +5251,6 @@ __metadata: stylelint-config-styled-components: ^0.1.1 stylelint-processor-styled-components: ^1.10.0 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 webpack: ^5.67.0 peerDependencies: @@ -5271,6 +5265,7 @@ __metadata: version: 0.0.0-use.local resolution: "@redux-devtools/utils@workspace:packages/redux-devtools-utils" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -5279,7 +5274,6 @@ __metadata: "@babel/runtime": ^7.16.7 "@redux-devtools/core": ^3.10.1 "@redux-devtools/serialize": ^0.4.0 - "@rollup/plugin-babel": ^5.3.0 "@types/get-params": ^0.1.0 "@types/jsan": ^3.1.2 "@types/lodash": ^4.14.178 @@ -5295,9 +5289,6 @@ __metadata: nanoid: ^3.2.0 redux: ^4.1.2 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@redux-devtools/core": ^3.7.0 @@ -7478,6 +7469,13 @@ __metadata: languageName: node linkType: hard +"@types/path-browserify@npm:^1.0.0": + version: 1.0.0 + resolution: "@types/path-browserify@npm:1.0.0" + checksum: e3f98ef9638fb75dc7547c3cde5fa86bc5986e38403ec91234abcc7b911e30711af7c6abc674d617d27c4a6c09e7f8e9d77662b1cc45d00d4708d94764202b61 + languageName: node + linkType: hard + "@types/pluralize@npm:^0.0.29": version: 0.0.29 resolution: "@types/pluralize@npm:0.0.29" @@ -11049,7 +11047,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.4.1, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2": +"chokidar@npm:^3.4.0, chokidar@npm:^3.4.1, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -11512,7 +11510,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:^4.1.1": +"commander@npm:^4.0.1, commander@npm:^4.1.1": version: 4.1.1 resolution: "commander@npm:4.1.1" checksum: d7b9913ff92cae20cb577a4ac6fcc121bd6223319e54a40f51a14740a681ad5c574fd29a57da478a5f234a6fa6c52cbf0b7c641353e03c648b1ae85ba670b977 @@ -11904,7 +11902,7 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": +"convert-source-map@npm:^1.1.0, convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.5.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": version: 1.8.0 resolution: "convert-source-map@npm:1.8.0" dependencies: @@ -12517,6 +12515,7 @@ __metadata: version: 0.0.0-use.local resolution: "d3-state-visualizer@workspace:packages/d3-state-visualizer" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -12557,6 +12556,7 @@ __metadata: version: 0.0.0-use.local resolution: "d3tooltip@workspace:packages/d3tooltip" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -14088,13 +14088,6 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^0.6.1": - version: 0.6.1 - resolution: "estree-walker@npm:0.6.1" - checksum: 9d6f82a4921f11eec18f8089fb3cce6e53bcf45a8e545c42a2674d02d055fb30f25f90495f8be60803df6c39680c80dcee7f944526867eb7aa1fc9254883b23d - languageName: node - linkType: hard - "estree-walker@npm:^1.0.1": version: 1.0.1 resolution: "estree-walker@npm:1.0.1" @@ -15071,6 +15064,13 @@ __metadata: languageName: node linkType: hard +"fs-readdir-recursive@npm:^1.1.0": + version: 1.1.0 + resolution: "fs-readdir-recursive@npm:1.1.0" + checksum: 29d50f3d2128391c7fc9fd051c8b7ea45bcc8aa84daf31ef52b17218e20bfd2bd34d02382742801954cc8d1905832b68227f6b680a666ce525d8b6b75068ad1e + languageName: node + linkType: hard + "fs-vacuum@npm:~1.2.10, fs-vacuum@npm:~1.2.9": version: 1.2.10 resolution: "fs-vacuum@npm:1.2.10" @@ -15635,7 +15635,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.3, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": +"glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.0.5, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": version: 7.2.0 resolution: "glob@npm:7.2.0" dependencies: @@ -19871,7 +19871,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.25.3, magic-string@npm:^0.25.7": +"magic-string@npm:^0.25.7": version: 0.25.7 resolution: "magic-string@npm:0.25.7" dependencies: @@ -20031,6 +20031,7 @@ __metadata: version: 0.0.0-use.local resolution: "map2tree@workspace:packages/map2tree" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -23818,13 +23819,13 @@ __metadata: version: 0.0.0-use.local resolution: "react-base16-styling@workspace:packages/react-base16-styling" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 "@babel/preset-env": ^7.16.11 "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 - "@rollup/plugin-babel": ^5.3.0 "@types/base16": ^1.0.2 "@types/color": ^3.0.2 "@types/jest": ^27.4.0 @@ -23841,10 +23842,7 @@ __metadata: jest: ^27.4.7 lodash.curry: ^4.1.1 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 languageName: unknown linkType: soft @@ -23974,6 +23972,7 @@ __metadata: version: 0.0.0-use.local resolution: "react-dock@workspace:packages/react-dock" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -23981,7 +23980,6 @@ __metadata: "@babel/preset-react": ^7.16.7 "@babel/preset-typescript": ^7.16.7 "@babel/runtime": ^7.16.7 - "@rollup/plugin-babel": ^5.3.0 "@types/jest": ^27.4.0 "@types/lodash": ^4.14.178 "@types/lodash.debounce": ^4.0.6 @@ -24001,10 +23999,7 @@ __metadata: react: ^17.0.2 react-test-renderer: ^17.0.2 rimraf: ^3.0.2 - rollup: ^2.66.0 - rollup-plugin-typescript2: ^0.31.1 ts-jest: ^27.1.3 - tslib: ^2.3.1 typescript: ~4.5.5 peerDependencies: "@types/react": ^16.3.0 || ^17.0.0 @@ -24175,6 +24170,7 @@ __metadata: version: 0.0.0-use.local resolution: "react-json-tree@workspace:packages/react-json-tree" dependencies: + "@babel/cli": ^7.16.8 "@babel/core": ^7.16.12 "@babel/eslint-parser": ^7.16.5 "@babel/plugin-transform-runtime": ^7.16.10 @@ -25615,26 +25611,6 @@ __metadata: languageName: node linkType: hard -"rollup-plugin-inject@npm:^3.0.0": - version: 3.0.2 - resolution: "rollup-plugin-inject@npm:3.0.2" - dependencies: - estree-walker: ^0.6.1 - magic-string: ^0.25.3 - rollup-pluginutils: ^2.8.1 - checksum: a014972c80fe34b8c8154056fa2533a8440066a31de831e3793fc21b15d108d92c22d8f7f472397bd5783d7c5e04d8cbf112fb72c5a26e997726e4eb090edad1 - languageName: node - linkType: hard - -"rollup-plugin-node-polyfills@npm:^0.2.1": - version: 0.2.1 - resolution: "rollup-plugin-node-polyfills@npm:0.2.1" - dependencies: - rollup-plugin-inject: ^3.0.0 - checksum: e84645212c443aca3cfae2ba69f01c6d8c5c250f0bf651416b69a4572b60aae9da7cdd687de3ab9b903f7a1ab96b06b71f0c4927d1b02a37485360d2b563937b - languageName: node - linkType: hard - "rollup-plugin-terser@npm:^7.0.2": version: 7.0.2 resolution: "rollup-plugin-terser@npm:7.0.2" @@ -25666,15 +25642,6 @@ __metadata: languageName: node linkType: hard -"rollup-pluginutils@npm:^2.8.1": - version: 2.8.2 - resolution: "rollup-pluginutils@npm:2.8.2" - dependencies: - estree-walker: ^0.6.1 - checksum: 339fdf866d8f4ff6e408fa274c0525412f7edb01dc46b5ccda51f575b7e0d20ad72965773376fb5db95a77a7fcfcab97bf841ec08dbadf5d6b08af02b7a2cf5e - languageName: node - linkType: hard - "rollup@npm:^2.66.0": version: 2.66.0 resolution: "rollup@npm:2.66.0"