Skip to content
Merged
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
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,11 @@ npm install ctix --save-dev

> **TypeScript version requirement**
>
> ctix 2.8.0 requires **TypeScript >=5.0.0 and <6.0.0**.
>
> TypeScript 6.x shifts to ESM-first defaults and introduces breaking changes to `moduleResolution` and `baseUrl` that are not yet supported by ctix. Until ctix adds ESM support, please keep your TypeScript version in the 5.x range.
> ctix supports **TypeScript >=5.0.0 and <7.0.0**.
>
> ```bash
> # install a compatible TypeScript version explicitly
> npm install typescript@">=5 <6" --save-dev
> # install a supported TypeScript version explicitly
> npm install typescript@">=5 <7" --save-dev
> ```

## Usage
Expand Down
3 changes: 1 addition & 2 deletions examples/tsconfig.empty.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,

/* Module Resolution Options */
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"rootDir": ".",
"paths": {
"#/*": ["src/*"]
"#/*": ["./src/*"]
},
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,

Expand Down
3 changes: 1 addition & 2 deletions examples/tsconfig.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,

/* Module Resolution Options */
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"rootDir": ".",
"paths": {
"#/*": ["src/*"]
"#/*": ["./src/*"]
},
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,

Expand Down
3 changes: 1 addition & 2 deletions examples/tsconfig.for.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "Node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"rootDir": ".",
"paths": {
"#/*": ["src/*"]
"#/*": ["./src/*"]
},
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,

Expand Down
3 changes: 1 addition & 2 deletions examples/type01/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@

/* Module Resolution Options */
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type02/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type03/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type04/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type05/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type06/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type07/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "Node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type08/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type09/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "Node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
1 change: 0 additions & 1 deletion examples/type10/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"module": "commonjs", /* Specify what module code is generated. */
"rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
Expand Down
1 change: 0 additions & 1 deletion examples/type11/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"module": "commonjs", /* Specify what module code is generated. */
"rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
Expand Down
3 changes: 1 addition & 2 deletions examples/type12/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,

/* Module Resolution Options */
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"rootDir": ".",
"paths": {
"#/*": ["src/*"]
"#/*": ["./src/*"]
},
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,

Expand Down
3 changes: 1 addition & 2 deletions examples/type13/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
/* Module Resolution Options */
"module": "CommonJS",
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
"paths": {} /* A series of entries which re-map imports to lookup locations relative to this config file. */,
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
Expand Down
1 change: 0 additions & 1 deletion examples/type14/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"baseUrl": "./src",
"paths": { }
},
"include": ["src/**/*"],
Expand Down
17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ctix",
"version": "2.8.1",
"version": "2.8.2",
"description": "Automatic create index.ts file",
"scripts": {
"clean": "rimraf ./dist",
Expand Down Expand Up @@ -65,9 +65,7 @@
}
}
},
"files": [
"dist"
],
"files": ["dist"],
"bin": {
"ctix": "./dist/cjs/cli.cjs"
},
Expand Down Expand Up @@ -109,11 +107,10 @@
"read-pkg": "^5.2.0",
"rimraf": "^5.0.5",
"rollup": "^4.14.2",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-dts": "^6.4.1",
"ts-node": "^10.9.2",
"tsc-alias": "^1.8.8",
"tsconfig-paths": "^4.2.0",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.1.1",
"vue": "^3.4.21"
},
Expand Down Expand Up @@ -142,7 +139,7 @@
"ora": "^5.4.1",
"pathe": "2.0.3",
"source-map-support": "^0.5.21",
"ts-morph": "27.0.0",
"ts-morph": "28.0.0",
"ts-pattern": "^5.0.5",
"tslib": "^2.6.2",
"type-check": "^0.4.0",
Expand All @@ -153,12 +150,10 @@
"peerDependencies": {
"prettier": ">=3",
"prettier-plugin-organize-imports": ">=3",
"typescript": ">=5 <6"
"typescript": ">=5 <7"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"cross-env NODE_ENV=production eslint --cache"
],
"*.{js,jsx,ts,tsx}": ["cross-env NODE_ENV=production eslint --cache"],
"*.{js,jsx,ts,tsx},*.json,.{eslintrc.cjs,prettierrc}": [
"cross-env NODE_ENV=production prettier --ignore-path .eslintignore --parser json --write"
]
Expand Down
Loading
Loading