Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"@swc-node/register": "1.10.9",
"@swc/core": "1.7.28",
"@swc/helpers": "0.5.13",
"@tsed/monorepo-utils": "2.3.11",
"@tsed/monorepo-utils": "2.3.13",
"@tsed/ts-doc": "5.0.0",
"@types/axios": "0.14.0",
"@types/globby": "9.1.0",
Expand All @@ -132,7 +132,6 @@
"eslint-plugin-vitest": "0.5.4",
"eslint-plugin-workspaces": "0.10.1",
"fs-extra": "^11.2.0",
"html-webpack-plugin": "5.6.0",
"husky": "9.1.6",
"is-ci": "3.0.1",
"lint-staged": "15.4.3",
Expand All @@ -148,13 +147,10 @@
"tslib": "2.7.0",
"typescript": "5.4.5",
"unplugin-swc": "1.5.1",
"vite": "6.3.5",
"vite": "6.2.2",
"vite-plugin-dts": "4.5.4",
"vite-tsconfig-paths": "5.1.4",
"vitest": "3.1.4",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1",
"webpack-remove-code-blocks": "^0.1.5"
"vitest": "3.1.4"
},
"directories": {
"packages": "packages",
Expand Down
14 changes: 1 addition & 13 deletions packages/config/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
25 changes: 12 additions & 13 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/core.umd.min.js",
"browser": "./lib/browser/core.umd.cjs",
"exports": {
".": {
"tsed-source": "./src/index.ts",
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/core.umd.min.js",
"browser": "./lib/browser/core.umd.cjs",
"import": "./lib/esm/index.js",
"default": "./lib/esm/index.js"
},
"./**/*": {
"tsed-source": "./src/**/*.ts",
"types": "./lib/types/**/*.d.ts",
"import": "./lib/esm/**/*.js",
"default": "./lib/esm/**/*.js"
"./*.js": {
"tsed-source": "./src/*.ts",
"types": "./lib/types/*.d.ts",
"import": "./lib/esm/*.js",
"default": "./lib/esm/*.js"
}
},
"scripts": {
"build": "yarn barrels && yarn build:ts && yarn run build:browser",
"barrels": "barrels",
"build:browser": "webpack",
"build:browser": "vite build",
"build:ts": "tsc --build tsconfig.esm.json",
"test": "vitest run",
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
Expand All @@ -37,13 +37,12 @@
},
"devDependencies": {
"@tsed/barrels": "workspace:*",
"@tsed/monorepo-utils": "2.3.11",
"@tsed/monorepo-utils": "2.3.13",
"@tsed/typescript": "workspace:*",
"@tsed/vitest": "workspace:*",
"eslint": "9.12.0",
"typescript": "5.4.5",
"vite": "6.3.5",
"vitest": "3.1.4",
"webpack": "^5.75.0"
"vite": "6.2.2",
"vite-plugin-dts": "4.5.4",
"vitest": "3.1.4"
}
}
2 changes: 1 addition & 1 deletion packages/core/src/utils/useDecorators.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {AnyDecorator} from "../../types/AnyDecorator.js";
import {StoreFn} from "../decorators/storeFn.js";
import type {AnyDecorator} from "../types/AnyDecorator.js";
import {Store} from "../types/Store.js";
import {useDecorators} from "./useDecorators.js";

Expand Down
14 changes: 1 addition & 13 deletions packages/core/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
22 changes: 22 additions & 0 deletions packages/core/vite.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {defineConfig} from "vite";
import {resolve} from "path";

Comment on lines +1 to +3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Define __dirname for ESM resolution
Same issue as in @tsed/hooks: import.meta.dirname is invalid in Node ESM. Derive __dirname using fileURLToPath(import.meta.url).

🤖 Prompt for AI Agents
In packages/core/vite.config.mts at the top of the file (lines 1 to 3), define
the __dirname constant for ESM by importing fileURLToPath and URL from 'url' and
then setting __dirname to the directory name of the current module using
fileURLToPath(import.meta.url). This replaces the invalid import.meta.dirname
usage and ensures proper path resolution in ESM.

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
// dts({
// outDir: "lib/browser/types",
// include: ["src"],
// exclude: ["**/*.spec.{ts,tsx}", "**/*.stories.{ts,tsx}"],
// })
],
Comment on lines +6 to +12
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove or enable the commented dts plugin
The placeholder for the TypeScript declaration plugin is commented out. Clean up by removing it or integrating it into the build and adding the plugin dependency.

🤖 Prompt for AI Agents
In packages/core/vite.config.mts around lines 6 to 12, the dts plugin
configuration is commented out. Either remove this commented block entirely if
the plugin is not needed, or uncomment and properly integrate the dts plugin
into the plugins array. If enabling it, ensure the dts plugin dependency is
installed and configured correctly for generating TypeScript declaration files.

build: {
outDir: "lib/browser",
lib: {
entry: resolve(import.meta.dirname, "src/index.ts"),
formats: ["umd"],
name: "@tsed/core",
fileName: "core",
},
Comment on lines +13 to +20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Match output filename to .cjs referenced in package.json
Using fileName: "core" yields core.umd.js, but the @tsed/core package expects .cjs. Update to output a .cjs file.

Example:

 lib: {
-  fileName: "core",
+  fileName: () => `core.umd.cjs`,
 },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
build: {
outDir: "lib/browser",
lib: {
entry: resolve(import.meta.dirname, "src/index.ts"),
formats: ["umd"],
name: "@tsed/core",
fileName: "core",
},
build: {
outDir: "lib/browser",
lib: {
entry: resolve(import.meta.dirname, "src/index.ts"),
formats: ["umd"],
name: "@tsed/core",
fileName: () => `core.umd.cjs`,
},
🤖 Prompt for AI Agents
In packages/core/vite.config.mts around lines 13 to 20, the output filename is
set to "core" which results in a file named core.umd.js, but the package.json
expects a .cjs extension. Update the fileName property to "core.cjs" to ensure
the output file matches the expected .cjs extension.

}
});
4 changes: 0 additions & 4 deletions packages/core/webpack.config.cjs

This file was deleted.

10 changes: 5 additions & 5 deletions packages/di/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/di.umd.min.js",
"browser": "./lib/browser/di.umd.cjs",
"exports": {
".": {
"tsed-source": "./src/index.ts",
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/di.umd.min.js",
"browser": "./lib/browser/di.umd.cjs",
"import": "./lib/esm/index.js",
"default": "./lib/esm/index.js"
}
},
"scripts": {
"build": "yarn barrels && yarn build:ts && yarn run build:browser",
"build:browser": "webpack",
"build:browser": "vite build",
"barrels": "barrels",
"test": "vitest run",
"build:ts": "tsc --build tsconfig.esm.json",
Expand All @@ -38,8 +38,8 @@
"cross-env": "7.0.3",
"eslint": "9.12.0",
"typescript": "5.4.5",
"vitest": "3.1.4",
"webpack": "^5.75.0"
"vite": "6.2.2",
"vitest": "3.1.4"
},
"peerDependencies": {
"@tsed/core": ">=8.9.5",
Expand Down
14 changes: 1 addition & 13 deletions packages/di/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
19 changes: 19 additions & 0 deletions packages/di/vite.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {defineConfig} from "vite";
import {join} from "node:path";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
build: {
outDir: "lib/browser",
lib: {
entry: join(import.meta.dirname, "src/common/index.ts"),
formats: ["umd"],
name: "@tsed/di",
fileName: "di"
},
rollupOptions: {
external: /node_modules\/(.*)/
}
}
});
8 changes: 0 additions & 8 deletions packages/di/webpack.config.cjs

This file was deleted.

14 changes: 1 addition & 13 deletions packages/engines/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
14 changes: 1 addition & 13 deletions packages/graphql/apollo/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
14 changes: 1 addition & 13 deletions packages/graphql/graphql-ws/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
14 changes: 1 addition & 13 deletions packages/graphql/typegraphql/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
18 changes: 6 additions & 12 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,19 @@
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/core.umd.min.js",
"browser": "./lib/browser/hooks.umd.cjs",
"exports": {
".": {
"tsed-source": "./src/index.ts",
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/hooks.umd.min.js",
"browser": "./lib/browser/hooks.umd.cjs",
"import": "./lib/esm/index.js",
"default": "./lib/esm/index.js"
},
"./**/*.js": {
"types": "./lib/types/**/*.d.ts",
"import": "./lib/esm/**/*.js",
"default": "./lib/esm/**/*.js"
}
},
"scripts": {
"build": "yarn build:ts && yarn run build:browser",
"build:browser": "webpack",
"build:browser": "vite build",
"build:ts": "tsc --build tsconfig.esm.json",
"test": "vitest run",
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
Expand All @@ -34,13 +29,12 @@
"tslib": "2.7.0"
},
"devDependencies": {
"@tsed/monorepo-utils": "2.3.11",
"@tsed/monorepo-utils": "2.3.13",
"@tsed/typescript": "workspace:*",
"@tsed/vitest": "workspace:*",
"eslint": "9.12.0",
"typescript": "5.4.5",
"vite": "6.3.5",
"vitest": "3.1.4",
"webpack": "^5.75.0"
"vite": "6.2.2",
"vitest": "3.1.4"
}
}
14 changes: 1 addition & 13 deletions packages/hooks/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@
"noEmit": false
},
"include": ["src/**/*.ts", "src/**/*.json"],
"exclude": [
"node_modules",
"test",
"lib",
"benchmark",
"coverage",
"spec",
"**/*.benchmark.ts",
"**/*.spec.ts",
"keys",
"**/__mock__/**",
"webpack.config.js"
]
"exclude": ["node_modules", "test", "lib", "benchmark", "coverage", "spec", "**/*.benchmark.ts", "**/*.spec.ts", "keys", "**/__mock__/**"]
}
Loading
Loading