Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tsconfig/bases
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7db25a41bc5a9c0f66d91f6f3aa28438afcb2f18
Choose a base ref
...
head repository: tsconfig/bases
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 014e8927b7155640f65a7492fb4bb09f5c49f531
Choose a head ref

Commits on Apr 17, 2023

  1. Add es2023 to Node 18 lib

    According to node.green[^1] Node 18 supports ES2023 features.
    
    [^1]: https://node.green/#ES2023
    JamieMagee committed Apr 17, 2023
    1
    Copy the full SHA
    f1b1219 View commit details
  2. Add Node 20

    JamieMagee committed Apr 17, 2023
    Copy the full SHA
    be62f1e View commit details
  3. Merge pull request #170 from JamieMagee/node18-es2023

    Add `es2023` to Node 18
    orta authored Apr 17, 2023
    1
    Copy the full SHA
    85cf782 View commit details
  4. Merge pull request #171 from JamieMagee/node20

    Add Node 20
    orta authored Apr 17, 2023
    1
    Copy the full SHA
    63a8253 View commit details
  5. [react-native] Update list of suported libs

    The tsconfig already supports esnext syntax, but RN supports some newer libraries than the es2019 target.

 This adds the libs where the types declared are implemented by Hermes as of current main branch (found via code search or internal searches) or an RN polypill (like for promise).
    
    

I bumped the major here, so users on older versions of RN don’t get the new libs showing up as supported without explicitly updating. This will be accompanied by a change which bumps the version in our own template.
    NickGerleman authored Apr 17, 2023
    Copy the full SHA
    fd08789 View commit details

Commits on Apr 18, 2023

  1. Merge pull request #172 from tsconfig/NickGerleman-patch-1

    [react-native] Update list of suported libs
    NickGerleman authored Apr 18, 2023
    1
    Copy the full SHA
    eee5f19 View commit details
  2. Go back es2022

    orta committed Apr 18, 2023
    1
    Copy the full SHA
    5063f71 View commit details
  3. 1
    Copy the full SHA
    821d9aa View commit details

Commits on Apr 20, 2023

  1. Move verbatimModuleSyntax from strictest to ESM

    Luka Prebil Grintal authored Apr 20, 2023
    Copy the full SHA
    f674fa6 View commit details
  2. Merge pull request #175 from LukaPrebil/#168-move-verbatimModuleSynta…

    …x-from-strictest-to-esm
    
    Move `verbatimModuleSyntax` from strictest to ESM
    orta authored Apr 20, 2023
    1
    Copy the full SHA
    67905a4 View commit details

Commits on Apr 21, 2023

  1. Copy the full SHA
    9a2d72d View commit details
  2. Copy the full SHA
    14dcd67 View commit details
  3. Merge pull request #176 from RobinTail/node19-base

    Node19 base
    orta authored Apr 21, 2023
    1
    Copy the full SHA
    3b80405 View commit details
  4. Copy the full SHA
    9627b56 View commit details
  5. Copy the full SHA
    8f3f1bc View commit details
  6. Merge pull request #177 from steffen-4s1/patch-1

    Add "tsc --showConfig" command to combine section in readme
    orta authored Apr 21, 2023
    1
    Copy the full SHA
    41a0841 View commit details

Commits on Apr 22, 2023

  1. Merge pull request #178 from RobinTail/node19-v2

    Node 19 base v2
    orta authored Apr 22, 2023
    1
    Copy the full SHA
    84f3d68 View commit details

Commits on May 2, 2023

  1. Copy the full SHA
    630f30e View commit details

Commits on May 5, 2023

  1. Merge pull request #181 from tri-star/update-nuxt-config

    Update nuxt.json: Add .nuxt, dist to "exclude" to match create-nuxt-app.
    orta authored May 5, 2023
    1
    Copy the full SHA
    08f67df View commit details

Commits on May 9, 2023

  1. Copy the full SHA
    97103a0 View commit details
  2. Update vite-react.json

    orta authored May 9, 2023
    Copy the full SHA
    63b78fd View commit details
  3. Merge pull request #186 from MatthijsKok/main

    Use `moduleResolution: bundler` for Vite React
    orta authored May 9, 2023
    1
    Copy the full SHA
    b819caf View commit details
  4. Copy the full SHA
    47d3c29 View commit details

Commits on May 10, 2023

  1. [react-native] moduleResolution: "nodenext".

    This lets TypeScript do ESM style resolution with export maps.
    
    It requires TS 4.7, but our template has shipped with 4.8, so it's probably fine to let the repo do it's normal patch bump?
    
    When we can target 5.0 we should maybe consider changing it to `moduleResolution: "bundler"`.
    NickGerleman authored May 10, 2023
    5
    Copy the full SHA
    e2fbea2 View commit details
  2. Copy the full SHA
    5b4e858 View commit details
  3. Merge pull request #188 from tsconfig/NickGerleman-rn-export-maps

    [react-native] `moduleResolution: "nodenext"`
    NickGerleman authored May 10, 2023
    1
    Copy the full SHA
    3bdac9b View commit details

Commits on May 11, 2023

  1. Merge pull request #187 from TatsuyaYamamoto/module-node16

    Use `module: node16` for Node.js 16+
    orta authored May 11, 2023
    1
    Copy the full SHA
    4c413cf View commit details

Commits on May 17, 2023

  1. Move back to "moduleResolution: node"

    We probably don't want this in 0.72 yet, since Metro won't work with this by default yet, and `moduleResolution: bundler` is better and slated to come to 0.73.
    NickGerleman authored May 17, 2023
    Copy the full SHA
    ff22f83 View commit details
  2. Merge pull request #193 from tsconfig/NickGerleman-revert-moduleresol…

    …ution
    
    Move back to "moduleResolution: node"
    NickGerleman authored May 17, 2023
    1
    Copy the full SHA
    c02bced View commit details

Commits on Jun 21, 2023

  1. Copy the full SHA
    a8c454f View commit details
  2. bundler needs nodenext

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    449f1c9 View commit details
  3. Update node12

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    b1eae8c View commit details
  4. bundler needs esnext

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    700981c View commit details
  5. Delist esm.json

    andrewbranch committed Jun 21, 2023
    Copy the full SHA
    7f15ea0 View commit details

Commits on Jun 22, 2023

  1. Bump some versions

    orta committed Jun 22, 2023
    Copy the full SHA
    7301ec5 View commit details

Commits on Jun 27, 2023

  1. Copy the full SHA
    4fd7c96 View commit details
  2. Major semver to all of them

    orta committed Jun 27, 2023
    Copy the full SHA
    f2fd2b6 View commit details
  3. Merge pull request #197 from andrewbranch/update-module-resolution

    Update module and moduleResolution to stop using node and invalid combintations
    orta authored Jun 27, 2023
    1
    Copy the full SHA
    014e892 View commit details
50 changes: 36 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
Hosts TSConfigs for you to extend in your apps, tuned to a particular runtime environment. Owned and improved by the community.
Basically Definitely Typed for TSConfigs.

We target the latest versions stable version of TypeScript, note that because we want to be consistent with the versioning the target runtime we can't always do semver releases.

### Available TSConfigs

<!-- AUTO -->
@@ -90,20 +92,6 @@ Add to your `tsconfig.json`:
```json
"extends": "@tsconfig/ember/tsconfig.json"
```
### ESM <kbd><a href="./bases/esm.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/esm
yarn add --dev @tsconfig/esm
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/esm/tsconfig.json"
```
### Next.js <kbd><a href="./bases/next.json">tsconfig.json</a></kbd>

Install:
@@ -216,6 +204,34 @@ Add to your `tsconfig.json`:
```json
"extends": "@tsconfig/node18/tsconfig.json"
```
### Node 19 <kbd><a href="./bases/node19.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/node19
yarn add --dev @tsconfig/node19
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/node19/tsconfig.json"
```
### Node 20 <kbd><a href="./bases/node20.json">tsconfig.json</a></kbd>

Install:

```sh
npm install --save-dev @tsconfig/node20
yarn add --dev @tsconfig/node20
```

Add to your `tsconfig.json`:

```json
"extends": "@tsconfig/node20/tsconfig.json"
```
### Nuxt <kbd><a href="./bases/nuxt.json">tsconfig.json</a></kbd>

Install:
@@ -337,6 +353,12 @@ to start from a Node 18 + Strictest base config, you can install both
}
```

You can see the result of the combined configs via `tsc --showConfig`.

### What about `@tsconfig/esm`?

We deprecated it in favour of setting [module/moduleResolution](https://github.com/tsconfig/bases/pull/197) to node/bundler.

### Contributing

```sh
4 changes: 2 additions & 2 deletions bases/create-react-app.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Create React App",

"_version": "2.0.0",

"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"moduleResolution": "bundler",
"target": "es2015",

"allowJs": true,
@@ -14,7 +15,6 @@
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"moduleResolution": "node",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,
4 changes: 3 additions & 1 deletion bases/docusaurus.json
Original file line number Diff line number Diff line change
@@ -2,13 +2,15 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Docusaurus v2",
"docs": "https://v2.docusaurus.io/docs/typescript-support",
"_version": "2.0.0",

"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"jsx": "react",
"lib": ["DOM"],
"moduleResolution": "Node16",
"module": "esnext",
"moduleResolution": "bundler",
"noEmit": true,
"types": ["node", "@docusaurus/module-type-aliases", "@docusaurus/theme-classic"],
"baseUrl": ".",
6 changes: 3 additions & 3 deletions bases/ember.json
Original file line number Diff line number Diff line change
@@ -2,15 +2,15 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Ember",
"docs": "https://docs.ember-cli-typescript.com",
"_version": "2.0.0",
"_version": "3.0.0",

// This is the base config used by Ember apps and addons. When actually used
// via Ember CLI (e.g. ember-cli-typescript's blueprint), it additionally has
// `compilerOptions.baseUrl`, `compilerOptions.paths`, and `include` set.
"compilerOptions": {
"target": "ES2021",
"module": "ES2020",
"moduleResolution": "node",
"module": "esnext",
"moduleResolution": "bundler",

// Trying to check Ember apps and addons with `allowJs: true` is a recipe
// for many unresolveable type errors, because with *considerable* extra
6 changes: 5 additions & 1 deletion bases/esm.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"_deprecated": true,
"$schema": "https://json.schemastore.org/tsconfig",
"display": "ESM",

"compilerOptions": {
"module": "es2022"
"module": "es2022",
"moduleResolution": "bundler",

"verbatimModuleSyntax": true
}
}
5 changes: 3 additions & 2 deletions bases/next.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"_version": "2.0.0",

"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
@@ -11,7 +12,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
8 changes: 4 additions & 4 deletions bases/node-lts.json
Original file line number Diff line number Diff line change
@@ -3,17 +3,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node LTS",
"_version": "18.12.1",
"_version": "18.1.0",
"compilerOptions": {
"lib": [
"es2022"
"es2023"
],
"module": "commonjs",
"module": "Node16",
"target": "es2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
5 changes: 3 additions & 2 deletions bases/node12.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 12",
"_version": "12.1.0",

"compilerOptions": {
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
"module": "commonjs",
"module": "node16",
"target": "es2019",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
5 changes: 3 additions & 2 deletions bases/node14.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 14",
"_version": "14.1.0",

"compilerOptions": {
"lib": ["es2020"],
"module": "commonjs",
"module": "node16",
"target": "es2020",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
5 changes: 3 additions & 2 deletions bases/node16.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 16",
"_version": "16.1.0",

"compilerOptions": {
"lib": ["es2021"],
"module": "commonjs",
"module": "Node16",
"target": "es2021",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
6 changes: 3 additions & 3 deletions bases/node17.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 17",

"_version": "17.1.0",
"compilerOptions": {
"lib": ["es2022"],
"module": "commonjs",
"module": "Node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
8 changes: 5 additions & 3 deletions bases/node18.json
Original file line number Diff line number Diff line change
@@ -2,15 +2,17 @@
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 18",

"_version": "18.2.0",

"compilerOptions": {
"lib": ["es2022"],
"module": "commonjs",
"lib": ["es2023"],
"module": "Node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node16"
}
}
18 changes: 18 additions & 0 deletions bases/node19.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 19",

"_version": "19.1.0",

"compilerOptions": {
"lib": ["es2023"],
"module": "Node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node16"
}
}
16 changes: 16 additions & 0 deletions bases/node20.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 20",

"compilerOptions": {
"lib": ["es2023"],
"module": "Node16",
"target": "es2022",

"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node16"
}
}
9 changes: 6 additions & 3 deletions bases/nuxt.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Nuxt",

"_version": "2.0.0",

"compilerOptions": {
"target": "ES2018",
"module": "ESNext",
"moduleResolution": "Node",
"moduleResolution": "bundler",
"lib": [
"ESNext",
"ESNext.AsyncIterable",
@@ -31,6 +32,8 @@
]
},
"exclude": [
"node_modules"
"node_modules",
".nuxt",
"dist"
]
}
18 changes: 15 additions & 3 deletions bases/react-native.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "React Native",
"_version": "2.0.3",
"_version": "3.0.2",
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"types": ["react-native", "jest"],
"lib": [
"es2019"
"es2019",
"es2020.bigint",
"es2020.date",
"es2020.number",
"es2020.promise",
"es2020.string",
"es2020.symbol.wellknown",
"es2021.promise",
"es2021.string",
"es2021.weakref",
"es2022.array",
"es2022.object",
"es2022.string"
],
"allowJs": true,
"jsx": "react-native",
@@ -17,7 +29,7 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"forceConsistentCasingInFileNames": false,
"esModuleInterop": true,
"skipLibCheck": true
},
Loading