Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
chore(node): support only LTS and current stable releases
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed Aug 17, 2022
1 parent 2658acf commit b938986
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

strategy:
matrix:
node-version: [10.13, 10.x, 11.x, 12.x, 13.x, 14.x, 15.x]
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v1
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- properly execute args validation for nullable items array (#1328)
### Others
- **Breaking Change**: update `class-validator` peer dependency to `>=0.13.0`
- **Breaking Change**: change build config to ES2019 - drop support for Node.js < 14.5

## v1.2.0-rc.1
### Features
Expand Down
10 changes: 5 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ It's important to set these options in the `tsconfig.json` file of our project:
}
```

`TypeGraphQL` is designed to work with Node.js LTS (10.3+, 12+) and the latest stable releases. It uses features from ES2018 so we should set our `tsconfig.json` file appropriately:
`TypeGraphQL` is designed to work with Node.js LTS and the latest stable releases. It uses features from ES2019 so we should set our `tsconfig.json` file appropriately:

```js
{
"target": "es2018" // or newer if your node.js version supports this
"target": "es2019" // or newer if your node.js version supports this
}
```

Due to using the `graphql-subscription` dependency that relies on an `AsyncIterator`, we may also have to provide the `esnext.asynciterable` to the `lib` option:

```json
{
"lib": ["es2018", "esnext.asynciterable"]
"lib": ["es2019", "esnext.asynciterable"]
}
```

Expand All @@ -60,9 +60,9 @@ All in all, the minimal `tsconfig.json` file example looks like this:
```json
{
"compilerOptions": {
"target": "es2018",
"target": "es2019",
"module": "commonjs",
"lib": ["es2018", "esnext.asynciterable"],
"lib": ["es2019", "esnext.asynciterable"],
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"apollo"
],
"engines": {
"node": ">= 10.13"
"node": ">= 14.5.0"
},
"private": true
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
/* Basic Options */
"target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"target": "es2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": [ /* Specify library files to be included in the compilation. */
"es2018",
"es2019",
"esnext.asynciterable"
],
// "allowJs": true, /* Allow javascript files to be compiled. */
Expand Down

0 comments on commit b938986

Please sign in to comment.