This commit is contained in:
Nathan Bierema 2023-12-15 00:02:59 -05:00
parent f40b960a3e
commit 15add8d1be
12 changed files with 30 additions and 66 deletions

View File

@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.esm.react.base.json",
"extends": "../../tsconfig.esm.base.json",
"compilerOptions": {
"outDir": "lib"
},

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,13 @@
module.exports = {
preset: 'ts-jest',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.m?[tj]sx?$': [
'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,38 +19,29 @@
"lib",
"src"
],
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"types": "lib/types/index.d.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git"
},
"scripts": {
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run 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",
"build": "tsc",
"clean": "rimraf lib",
"test": "jest",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit",
"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": {
"@babel/runtime": "^7.23.5",
"lodash": "^4.17.21"
"lodash-es": "^4.17.21"
},
"devDependencies": {
"@babel/cli": "^7.23.4",
"@babel/core": "^7.23.5",
"@babel/eslint-parser": "^7.23.3",
"@babel/preset-env": "^7.23.5",
"@babel/preset-typescript": "^7.23.3",
"@types/jest": "^29.5.11",
"@types/lodash": "^4.14.202",
"@types/lodash-es": "^4.17.12",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"eslint": "^8.55.0",

View File

@ -1,6 +1,4 @@
import isArray from 'lodash/isArray';
import isPlainObject from 'lodash/isPlainObject';
import mapValues from 'lodash/mapValues';
import { isArray, isPlainObject, mapValues } from 'lodash-es';
export interface Node {
name: string;

View File

@ -1,4 +1,4 @@
import { map2tree, Node } from '../src';
import { map2tree, Node } from '../src/index.js';
import * as immutable from 'immutable';
test('# rootNodeKey', () => {

View File

@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.react.base.json",
"extends": "../../tsconfig.esm.base.json",
"compilerOptions": {
"outDir": "lib/types"
},

View File

@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../tsconfig.esm.base.json",
"compilerOptions": {
"types": ["jest"]
},

View File

@ -374,34 +374,16 @@ importers:
packages/map2tree:
dependencies:
'@babel/runtime':
specifier: ^7.23.5
version: 7.23.5
lodash:
lodash-es:
specifier: ^4.17.21
version: 4.17.21
devDependencies:
'@babel/cli':
specifier: ^7.23.4
version: 7.23.4(@babel/core@7.23.5)
'@babel/core':
specifier: ^7.23.5
version: 7.23.5
'@babel/eslint-parser':
specifier: ^7.23.3
version: 7.23.3(@babel/core@7.23.5)(eslint@8.55.0)
'@babel/preset-env':
specifier: ^7.23.5
version: 7.23.5(@babel/core@7.23.5)
'@babel/preset-typescript':
specifier: ^7.23.3
version: 7.23.3(@babel/core@7.23.5)
'@types/jest':
specifier: ^29.5.11
version: 29.5.11
'@types/lodash':
specifier: ^4.14.202
version: 4.14.202
'@types/lodash-es':
specifier: ^4.17.12
version: 4.17.12
'@typescript-eslint/eslint-plugin':
specifier: ^6.13.2
version: 6.13.2(@typescript-eslint/parser@6.13.2)(eslint@8.55.0)(typescript@5.3.3)