Imprrove ability to tree-shake libraries (#1050)

* Revert "Remove React from page bundle (#1031)"

This reverts commit fdfbc1942e.

* 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.
This commit is contained in:
Nathan Bierema 2022-01-23 21:11:46 -05:00 committed by GitHub
parent b992fcc653
commit c379a62081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
141 changed files with 594 additions and 1136 deletions

View File

@ -1,6 +1,6 @@
{
"presets": [
"@babel/preset-env",
["@babel/preset-env", { "targets": "defaults" }],
"@babel/preset-react",
"@babel/preset-typescript"
]

View File

@ -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) {

View File

@ -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<unknown>,
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<S, A, MonitorState>
): LiftedState<S, A, MonitorState> {
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) =>
<S2, A2 extends Action<unknown>>(
reducer: Reducer<S2, A2>,
initialState?: PreloadedState<S2>
) => {
const key = `redux-dev-session-${sessionId}`;
let finalInitialState;
try {
const json = localStorage.getItem(key);
if (json) {
finalInitialState =
deserialize(JSON.parse(json) as LiftedState<S, A, MonitorState>) ||
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<S2> | undefined
);
return {
...store,
dispatch<T extends A2>(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;
},
};
};
}

View File

@ -1,2 +1,2 @@
examples
dist
lib

View File

@ -0,0 +1,7 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -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",

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1 +1 @@
dist
lib

View File

@ -0,0 +1,7 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -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",

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1 +1 @@
dist
lib

View File

@ -0,0 +1,7 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

View File

@ -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",

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1 +1 @@
dist
lib

View File

@ -0,0 +1,7 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -15,19 +15,23 @@
"license": "MIT",
"author": "Alexander <alexkuz@gmail.com> (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"
}
}

View File

@ -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;

View File

@ -301,5 +301,5 @@ export const invertTheme = (theme: Theme | undefined): Theme | undefined => {
return theme;
};
export { Base16Theme };
export type { Base16Theme };
export * from './types';

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1,2 +1,2 @@
demo
dist
lib

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -15,19 +15,23 @@
"license": "MIT",
"author": "Alexander <alexkuz@gmail.com> (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": {

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1,2 +1,2 @@
dist
examples
lib

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -19,20 +19,25 @@
"Mihail Diordiev <zalmoxisus@gmail.com> (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",

View File

@ -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;

View File

@ -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';

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1,3 +1,3 @@
build
dist
lib
umd

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -9,13 +9,15 @@
"license": "MIT",
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (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",

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib",
"outDir": "lib/types",
"types": ["webpack-env"]
},
"include": ["src"]

View File

@ -1 +1 @@
dist
lib

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -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": {

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -18,19 +18,23 @@
"license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (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": {

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1 +1 @@
dist
lib

View File

@ -0,0 +1,7 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -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": {

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1,2 +1,2 @@
demo
dist
lib

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -19,19 +19,23 @@
"license": "MIT",
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (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": {

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib",
"outDir": "lib/types",
"resolveJsonModule": true
},
"include": ["src"]

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -9,16 +9,20 @@
"Mihail Diordiev <zalmoxisus@gmail.com> (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": {

View File

@ -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';

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib",
"outDir": "lib/types",
"types": ["chrome", "node"]
},
"include": ["src"]

View File

@ -1,2 +1,2 @@
demo
dist
lib

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -12,19 +12,23 @@
"Mihail Diordiev <zalmoxisus@gmail.com> (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": {

View File

@ -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;

View File

@ -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';

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib",
"outDir": "lib/types",
"resolveJsonModule": true
},
"include": ["src"]

View File

@ -1 +1 @@
dist
lib

View File

@ -0,0 +1,6 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
]
}

View File

@ -17,19 +17,23 @@
"license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (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": {

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "lib",
"outDir": "lib/types",
"types": ["node"]
},
"include": ["src"]

View File

@ -1 +1 @@
dist
lib

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -18,19 +18,23 @@
"license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (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": {

View File

@ -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;

View File

@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.react.base.json",
"compilerOptions": {
"outDir": "lib"
"outDir": "lib/types"
},
"include": ["src"]
}

View File

@ -1,2 +1,2 @@
dist
examples
lib

View File

@ -0,0 +1,7 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -18,19 +18,23 @@
"license": "MIT",
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (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": {

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More