chore: Correct the packaging configuration files of different modules.

This commit is contained in:
Revone 2023-11-13 23:51:43 +08:00
parent 65af9d6f20
commit cfe97b3adc
8 changed files with 263 additions and 45 deletions

View file

@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
## [v1.43.1](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
## [v1.43.3](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
### Changes

215
package-lock.json generated
View file

@ -1,14 +1,15 @@
{
"name": "data-structure-typed",
"version": "1.43.1",
"version": "1.43.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "data-structure-typed",
"version": "1.43.1",
"version": "1.43.3",
"license": "MIT",
"devDependencies": {
"@swc/core": "^1.3.96",
"@types/benchmark": "^2.1.3",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.2",
@ -1915,6 +1916,216 @@
"@sinonjs/commons": "^3.0.0"
}
},
"node_modules/@swc/core": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.96.tgz",
"integrity": "sha512-zwE3TLgoZwJfQygdv2SdCK9mRLYluwDOM53I+dT6Z5ZvrgVENmY3txvWDvduzkV+/8IuvrRbVezMpxcojadRdQ==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
"@swc/counter": "^0.1.1",
"@swc/types": "^0.1.5"
},
"engines": {
"node": ">=10"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/swc"
},
"optionalDependencies": {
"@swc/core-darwin-arm64": "1.3.96",
"@swc/core-darwin-x64": "1.3.96",
"@swc/core-linux-arm-gnueabihf": "1.3.96",
"@swc/core-linux-arm64-gnu": "1.3.96",
"@swc/core-linux-arm64-musl": "1.3.96",
"@swc/core-linux-x64-gnu": "1.3.96",
"@swc/core-linux-x64-musl": "1.3.96",
"@swc/core-win32-arm64-msvc": "1.3.96",
"@swc/core-win32-ia32-msvc": "1.3.96",
"@swc/core-win32-x64-msvc": "1.3.96"
},
"peerDependencies": {
"@swc/helpers": "^0.5.0"
},
"peerDependenciesMeta": {
"@swc/helpers": {
"optional": true
}
}
},
"node_modules/@swc/core-darwin-arm64": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.96.tgz",
"integrity": "sha512-8hzgXYVd85hfPh6mJ9yrG26rhgzCmcLO0h1TIl8U31hwmTbfZLzRitFQ/kqMJNbIBCwmNH1RU2QcJnL3d7f69A==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-darwin-x64": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.96.tgz",
"integrity": "sha512-mFp9GFfuPg+43vlAdQZl0WZpZSE8sEzqL7sr/7Reul5McUHP0BaLsEzwjvD035ESfkY8GBZdLpMinblIbFNljQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-linux-arm-gnueabihf": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.96.tgz",
"integrity": "sha512-8UEKkYJP4c8YzYIY/LlbSo8z5Obj4hqcv/fUTHiEePiGsOddgGf7AWjh56u7IoN/0uEmEro59nc1ChFXqXSGyg==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-linux-arm64-gnu": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.96.tgz",
"integrity": "sha512-c/IiJ0s1y3Ymm2BTpyC/xr6gOvoqAVETrivVXHq68xgNms95luSpbYQ28rqaZC8bQC8M5zdXpSc0T8DJu8RJGw==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-linux-arm64-musl": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.96.tgz",
"integrity": "sha512-i5/UTUwmJLri7zhtF6SAo/4QDQJDH2fhYJaBIUhrICmIkRO/ltURmpejqxsM/ye9Jqv5zG7VszMC0v/GYn/7BQ==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-linux-x64-gnu": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.96.tgz",
"integrity": "sha512-USdaZu8lTIkm4Yf9cogct/j5eqtdZqTgcTib4I+NloUW0E/hySou3eSyp3V2UAA1qyuC72ld1otXuyKBna0YKQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-linux-x64-musl": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.96.tgz",
"integrity": "sha512-QYErutd+G2SNaCinUVobfL7jWWjGTI0QEoQ6hqTp7PxCJS/dmKmj3C5ZkvxRYcq7XcZt7ovrYCTwPTHzt6lZBg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-win32-arm64-msvc": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.96.tgz",
"integrity": "sha512-hjGvvAduA3Un2cZ9iNP4xvTXOO4jL3G9iakhFsgVhpkU73SGmK7+LN8ZVBEu4oq2SUcHO6caWvnZ881cxGuSpg==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-win32-ia32-msvc": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.96.tgz",
"integrity": "sha512-Far2hVFiwr+7VPCM2GxSmbh3ikTpM3pDombE+d69hkedvYHYZxtTF+2LTKl/sXtpbUnsoq7yV/32c9R/xaaWfw==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/core-win32-x64-msvc": {
"version": "1.3.96",
"resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.96.tgz",
"integrity": "sha512-4VbSAniIu0ikLf5mBX81FsljnfqjoVGleEkCQv4+zRlyZtO3FHoDPkeLVoy6WRlj7tyrRcfUJ4mDdPkbfTO14g==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@swc/counter": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.2.tgz",
"integrity": "sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==",
"dev": true
},
"node_modules/@swc/types": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.5.tgz",
"integrity": "sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==",
"dev": true
},
"node_modules/@tsconfig/node10": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz",

View file

@ -2,15 +2,15 @@
"name": "data-structure-typed",
"version": "1.43.3",
"description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
"main": "dist/cjs/src/index.js",
"module": "dist/mjs/src/index.js",
"types": "dist/mjs/src/index.d.ts",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
"types": "dist/mjs/index.d.ts",
"umd:main": "dist/umd/data-structure-typed.min.js",
"exports": {
".": {
"import": "./dist/mjs/src/index.js",
"require": "./dist/cjs/src/index.js",
"types": "./dist/mjs/src/index.d.ts"
"import": "./dist/mjs/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/mjs/index.d.ts"
}
},
"scripts": {
@ -19,25 +19,23 @@
"build:cjs": "rm -rf dist/cjs && tsc -p tsconfig-cjs.json",
"build:umd": "tsup",
"build:docs": "typedoc --out docs ./src",
"test:unit": "jest --runInBand",
"test:integration": "npm run update:subs && jest --config jest.integration.config.js",
"test:perf": "ts-node test/performance/reportor.ts",
"check": "tsc --noEmit",
"check:circular-refs": "dependency-cruiser src",
"lint:src": "eslint --fix 'src/**/*.{js,ts}'",
"lint:test": "eslint --fix 'test/**/*.{js,ts}'",
"lint": "npm run lint:src && npm run lint:test",
"inspect": "npm run check && npm run lint",
"format:src": "prettier --write 'src/**/*.{js,ts}'",
"format:test": "prettier --write 'test/**/*.{js,ts}'",
"format": "npm run format:src && npm run format:test",
"reformat:src": "npm run lint:src && npm run format:src",
"reformat:test": "npm run lint:test && npm run format:test",
"reformat": "npm run reformat:src && npm run reformat:test",
"ci": "env && git fetch --tags && npm run check && npm run lint && npm run build && npm run test:unit && npm run changelog",
"update:subs": "npm i avl-tree-typed binary-tree-typed bst-typed heap-typed --save-dev",
"install:all-subs": "npm i avl-tree-typed binary-tree-typed bst-typed deque-typed directed-graph-typed doubly-linked-list-typed graph-typed heap-typed linked-list-typed max-heap-typed max-priority-queue-typed min-heap-typed min-priority-queue-typed priority-queue-typed singly-linked-list-typed stack-typed tree-multimap-typed trie-typed undirected-graph-typed queue-typed --save-dev",
"test": "jest --runInBand",
"test:integration": "npm run update:subs && jest --config jest.integration.config.js",
"test:perf": "ts-node test/performance/reportor.ts",
"check:deps": "dependency-cruiser src",
"changelog": "auto-changelog",
"coverage:badge": "istanbul-badges-readme",
"ci": "env && git fetch --tags && npm run check && npm run lint && npm run build && npm run test && npm run changelog",
"copy:to-subs": "sh scripts/copy_to_all_subs.sh",
"publish:subs": "npm run copy:to-subs && sh scripts/publish_all_subs.sh",
"publish:docs": "sh scripts/publish_docs.sh",
@ -57,6 +55,7 @@
},
"homepage": "https://data-structure-typed-docs.vercel.app",
"devDependencies": {
"@swc/core": "^1.3.96",
"@types/benchmark": "^2.1.3",
"@types/jest": "^29.5.5",
"@types/node": "^20.8.2",

View file

@ -12,7 +12,6 @@
"noFallthroughCasesInSwitch": true, // Forced to check whether the case statement in the switch statement has the fallthrough mark.
"pretty": true, // Output a pretty error message.
"resolveJsonModule": true, // Enable parsing of the JSON module.
"rootDir": "./", // Specify the root directory of the source files in the project.
"skipLibCheck": true, // Skip type checking of type libraries.
"strict": true, // Enable strict type checking, including enabling all strict options.
"traceResolution": false, // Whether to trace the module resolution process.

View file

@ -1,11 +1,12 @@
{
"extends": "./tsconfig-base.json",
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "node",
"rootDir": "./src/",
"outDir": "dist/cjs",
"module": "CommonJS",
"target": "ES2015",
"sourceMap": true
"moduleResolution": "node",
"sourceMap": true,
},
"include": [
"./src/**/*.ts"

View file

@ -1,10 +1,12 @@
{
"extends": "./tsconfig-base.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"rootDir": "./src/",
"outDir": "dist/mjs",
"target": "ESNext"
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Node",
"sourceMap": false
},
"include": [
"./src/**/*.ts"

View file

@ -1,10 +1,12 @@
{
"extends": "./tsconfig-base.json",
"compilerOptions": {
"rootDir": "./", // Specify the root directory of the source files in the project.
"outDir": "dist/dev",
"module": "NodeNext",
"target": "ESNext",
"moduleResolution": "NodeNext",
"outDir": "dist/mjs",
"target": "ESNext"
"sourceMap": false
},
"include": [
"./src/**/*.ts",

View file

@ -1,25 +1,28 @@
export default [{
entryPoints: {
"data-structure-typed": "src/index.ts"
},
format: ["iife"],
clean: true,
sourcemap: true,
minify: true,
outDir: "dist/umd",
globalName: "dataStructureTyped",
platform: "browser",
bundle: true,
outExtension() {
return {
js: `.min.js`,
}
},
},
export default [
{
entryPoints: {
"data-structure-typed": "src/index.ts"
},
target: 'es5',
format: ["iife"],
clean: true,
sourcemap: true,
minify: true,
outDir: "dist/umd",
globalName: "dataStructureTyped",
platform: "browser",
bundle: true,
outExtension() {
return {
js: `.min.js`,
}
},
},
{
entryPoints: {
"data-structure-typed": "src/index.ts"
},
target: 'es6',
format: ["iife"],
clean: true,
sourcemap: false,
@ -33,4 +36,5 @@ export default [{
js: `.js`,
}
},
}];
}
];