Skip to content

Commit

Permalink
Remove "target" from build.json
Browse files Browse the repository at this point in the history
So that compilerOptions.target is pulled from the base tsconfig instead
Fixes isaacs#54
  • Loading branch information
timovv committed Mar 21, 2024
1 parent 8fda22e commit 08d456d
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion .tshy/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../src",
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext"
}
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ in `src/<whatever>.ts` and the CommonJS polyfill living in

If you want to keep some files from being processed by tshy's
builds entirely, you can add an `exclude` `string[]` field to the
`tshy` object in `package.json`. For example:
`tshy` object in `package.json`. For example:
```json
{
Expand Down Expand Up @@ -701,7 +701,6 @@ following caveats:
- `outDir` - will be overridden based on build, best omitted
- `rootDir` - will be set to `./src` in the build, can only
cause annoying errors otherwise.
- `target` - will be set to `es2022`
- `module` - will be set to `NodeNext`
- `moduleResolution` - will be set to `NodeNext`

Expand All @@ -721,7 +720,7 @@ tsconfig file. This is often useful when you have multiple
`typescript-eslint`, specifying `"noEmit": true` and
`"include": ["**/*.ts"]`
- A `tsconfig.build.json` for compilation, with `"noEmit":
false`. Note that the [caveats](#tsconfigs) above still apply.
false`. Note that the [caveats](#tsconfigs) above still apply.
```json
{
Expand Down
1 change: 0 additions & 1 deletion src/tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const build: Record<string, any> = {
: join('..', config.project),
compilerOptions: {
rootDir: '../src',
target: 'es2022',
module: 'nodenext',
moduleResolution: 'nodenext',
},
Expand Down
3 changes: 0 additions & 3 deletions tap-snapshots/test/tsconfig.ts.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Object {
"module": "nodenext",
"moduleResolution": "nodenext",
"rootDir": "../src",
"target": "es2022",
},
"extends": "../custom.json",
}
Expand Down Expand Up @@ -104,7 +103,6 @@ Object {
"module": "nodenext",
"moduleResolution": "nodenext",
"rootDir": "../src",
"target": "es2022",
},
"extends": "../tsconfig.json",
}
Expand All @@ -116,7 +114,6 @@ Object {
"module": "nodenext",
"moduleResolution": "nodenext",
"rootDir": "../src",
"target": "es2022",
},
"extends": "../tsconfig.json",
}
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/basic-custom-project/.tshy/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.custom.json",
"compilerOptions": {
"rootDir": "../src",
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext"
}
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/basic-imports-only-deps/.tshy/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../src",
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext"
}
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/basic/.tshy/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../src",
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext"
}
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/imports-with-star/.tshy/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../src",
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext"
}
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/imports/.tshy/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../src",
"target": "es2022",
"module": "nodenext",
"moduleResolution": "nodenext"
}
Expand Down

0 comments on commit 08d456d

Please sign in to comment.