Skip to content

Commit

Permalink
feat: add tsconfigs with moduleResolution Node16 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Sep 14, 2024
2 parents f4238e0 + ffbeb8b commit 2267446
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 6 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "1.0.0",
"private": true,
"scripts": {
"all": "pnpm run-s build test",
"test": "pnpm -r --workspace-concurrency 1 --filter=./playgrounds/* test",
"test:cjs": "pnpm -r --workspace-concurrency 1 --filter=./playgrounds/cjs test",
"test:esm": "pnpm -r --workspace-concurrency 1 --filter=./playgrounds/esm test",
"test:nextjs": "pnpm -r --workspace-concurrency 1 --filter=./playgrounds/nextjs test",
"build": "pnpm -r --workspace-concurrency 1 --filter=./playgrounds/* build"
},
"devDependencies": {
"npm-run-all2": "~6.2.3",
"tsx": "~4.19.1",
"typescript": "~5.6.2"
},
Expand Down
13 changes: 10 additions & 3 deletions playgrounds/cjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
"private": true,
"type": "commonjs",
"scripts": {
"build": "tsc",
"all": "pnpm run-s build test",
"build": "pnpm run-s build:node10 build:node16 build:bundler",
"build:node10": "tsc",
"build:node16": "tsc --project tsconfig.node16.json",
"build:bundler": "tsc --project tsconfig.bundler.json",
"test": "pnpm run-s test:js test:ts",
"test:js": "node index.js",
"test:ts": "tsx index.ts",
"test": "pnpm run test:js && pnpm run test:ts"
"test:ts": "pnpm run-s test:ts:node10 test:ts:node16 test:ts:bundler",
"test:ts:node10": "tsx index.ts",
"test:ts:node16": "tsx --tsconfig tsconfig.node16.json index.ts",
"test:ts:bundler": "tsx --tsconfig tsconfig.bundler.json index.ts"
}
}
7 changes: 7 additions & 0 deletions playgrounds/cjs/tsconfig.bundler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler"
}
}
7 changes: 7 additions & 0 deletions playgrounds/cjs/tsconfig.node16.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "Node16",
"moduleResolution": "Node16"
}
}
13 changes: 10 additions & 3 deletions playgrounds/esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@
"private": true,
"type": "module",
"scripts": {
"build": "tsc",
"all": "pnpm run-s build test",
"build": "pnpm run-s build:node10 build:node16 build:bundler",
"build:node10": "tsc",
"build:node16": "tsc --project tsconfig.node16.json",
"build:bundler": "tsc --project tsconfig.bundler.json",
"test": "pnpm run-s test:js test:ts",
"test:js": "node index.js",
"test:ts": "tsx index.ts",
"test": "pnpm run test:js && pnpm run test:ts"
"test:ts": "pnpm run-s test:ts:node10 test:ts:node16 test:ts:bundler",
"test:ts:node10": "tsx index.ts",
"test:ts:node16": "tsx --tsconfig tsconfig.node16.json index.ts",
"test:ts:bundler": "tsx --tsconfig tsconfig.bundler.json index.ts"
}
}
7 changes: 7 additions & 0 deletions playgrounds/esm/tsconfig.bundler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler"
}
}
7 changes: 7 additions & 0 deletions playgrounds/esm/tsconfig.node16.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "Node16",
"moduleResolution": "Node16"
}
}
52 changes: 52 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2267446

Please sign in to comment.