This commit is contained in:
Nathan Bierema 2024-04-06 22:07:29 -04:00
parent ab2faf64c7
commit df978aba1a
8 changed files with 12 additions and 53 deletions

View File

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

View File

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

View File

@ -0,0 +1,6 @@
module.exports = {
extensionsToTreatAsEsm: ['.ts'],
transform: {
'^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.test.json', useESM: true }],
},
};

View File

@ -1,6 +0,0 @@
module.exports = {
preset: 'ts-jest',
transform: {
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
},
};

View File

@ -19,36 +19,27 @@
"lib", "lib",
"src" "src"
], ],
"main": "lib/cjs/index.js", "main": "lib/index.js",
"module": "lib/esm/index.js", "types": "lib/index.d.ts",
"types": "lib/types/index.d.ts", "type": "module",
"sideEffects": false, "sideEffects": false,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git" "url": "https://github.com/reduxjs/redux-devtools.git"
}, },
"scripts": { "scripts": {
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", "build": "tsc",
"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", "clean": "rimraf lib",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "pnpm run clean && pnpm run build", "prepack": "pnpm run clean && pnpm run build",
"prepublish": "pnpm run type-check && pnpm run lint && pnpm run test" "prepublish": "pnpm run lint && pnpm run test"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.24.1",
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.24.1",
"@babel/core": "^7.24.3",
"@babel/eslint-parser": "^7.24.1",
"@babel/preset-env": "^7.24.3",
"@babel/preset-typescript": "^7.24.1",
"@types/jest": "^29.5.12", "@types/jest": "^29.5.12",
"@types/lodash": "^4.17.0", "@types/lodash": "^4.17.0",
"@typescript-eslint/eslint-plugin": "^7.4.0", "@typescript-eslint/eslint-plugin": "^7.4.0",

View File

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

View File

@ -374,28 +374,10 @@ importers:
packages/map2tree: packages/map2tree:
dependencies: dependencies:
'@babel/runtime':
specifier: ^7.24.1
version: 7.24.1
lodash: lodash:
specifier: ^4.17.21 specifier: ^4.17.21
version: 4.17.21 version: 4.17.21
devDependencies: devDependencies:
'@babel/cli':
specifier: ^7.24.1
version: 7.24.1(@babel/core@7.24.3)
'@babel/core':
specifier: ^7.24.3
version: 7.24.3
'@babel/eslint-parser':
specifier: ^7.24.1
version: 7.24.1(@babel/core@7.24.3)(eslint@8.57.0)
'@babel/preset-env':
specifier: ^7.24.3
version: 7.24.3(@babel/core@7.24.3)
'@babel/preset-typescript':
specifier: ^7.24.1
version: 7.24.1(@babel/core@7.24.3)
'@types/jest': '@types/jest':
specifier: ^29.5.12 specifier: ^29.5.12
version: 29.5.12 version: 29.5.12