Skip to content

Commit 185635e

Browse files
Update NodeJS and TypeScript (#23)
* Update to Node v20 * Update TypeScript to 5.4.2 * Update changelog
1 parent 2ab3967 commit 185635e

File tree

13 files changed

+31
-30
lines changed

13 files changed

+31
-30
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/hydrogen
1+
lts/iron

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Changes to be included in the next upcoming release
99

1010
- Improved error messages when unsupported enum types or unions of literal types are found, and allow these types to be used in relaxed types mode ([#17](https://github.com/hasura/ndc-nodejs-lambda/pull/17))
1111
- Improved naming of types that reside outside of the main `functions.ts` file. Type names will now only be prefixed with a disambiguator if there is a naming conflict detected (ie. where two different types use the same name). Anonymous types are now also named in a shorter way. ([#21](https://github.com/hasura/ndc-nodejs-lambda/pull/21))
12+
- Updated NodeJS to v20 and TypeScript to v5.4.2 ([#23](https://github.com/hasura/ndc-nodejs-lambda/pull/23))
1213

1314
## [1.1.0] - 2024-02-26
1415
- Updated to [NDC TypeScript SDK v4.2.0](https://github.com/hasura/ndc-sdk-typescript/releases/tag/v4.2.0) to include OpenTelemetry improvements. Traced spans should now appear in the Hasura Console

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18-alpine
1+
FROM node:20-alpine
22

33
RUN apk add jq
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "./node_modules/@tsconfig/node18/tsconfig.json"
2+
"extends": "./node_modules/@tsconfig/node20/tsconfig.json"
33
}

ndc-lambda-sdk/bin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const tsConfigFileLocation =
2222
? ts.findConfigFile(path.dirname(hostOpts.functions), ts.sys.fileExists)
2323
: undefined
2424
)
25-
?? require.resolve("@tsconfig/node18/tsconfig.json");
25+
?? require.resolve("@tsconfig/node20/tsconfig.json");
2626
const watchMode = hostOpts?.watch ?? false;
2727

2828
const hostScriptPath = path.resolve(__dirname, "../dist/src/host.js")

ndc-lambda-sdk/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ndc-lambda-sdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
},
3232
"dependencies": {
3333
"@hasura/ndc-sdk-typescript": "^4.2.1",
34-
"@tsconfig/node18": "^18.2.2",
34+
"@tsconfig/node20": "^20.1.2",
3535
"commander": "^11.1.0",
3636
"cross-spawn": "^7.0.3",
3737
"p-limit": "^3.1.0",
3838
"ts-api-utils": "^1.0.3",
3939
"ts-node": "^10.9.2",
4040
"ts-node-dev": "^2.0.0",
41-
"typescript": "^5.3.3"
41+
"typescript": "^5.4.2"
4242
},
4343
"devDependencies": {
4444
"@types/chai": "^4.3.11",

ndc-lambda-sdk/src/inference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function loadTsConfig(functionsFilePath: string): Result<ts.ParsedCommandLine, t
6767
const userTsConfig = ts.findConfigFile(functionsDir, ts.sys.fileExists);
6868
// If the user doesn't have a tsconfig, use this one as a fallback. The TypeScript defaults are bad
6969
// (eg. strict and strictNullChecks is off by default)
70-
const fallbackTsConfig = path.resolve(require.resolve("@tsconfig/node18/tsconfig.json"));
70+
const fallbackTsConfig = path.resolve(require.resolve("@tsconfig/node20/tsconfig.json"));
7171
const configPath = userTsConfig ?? fallbackTsConfig;
7272
const configFile = ts.readConfigFile(configPath, ts.sys.readFile)
7373
if (configFile.error) {

ndc-lambda-sdk/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./node_modules/@tsconfig/node18/tsconfig.json",
2+
"extends": "./node_modules/@tsconfig/node20/tsconfig.json",
33
"compilerOptions": {
44
"outDir": "dist",
55
"resolveJsonModule": true,

yeoman-generator/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)