Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NodeJS and TypeScript #23

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
lts/iron
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changes to be included in the next upcoming release

- 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))
- 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))
- Updated NodeJS to v20 and TypeScript to v5.4.2 ([#23](https://github.com/hasura/ndc-nodejs-lambda/pull/23))

## [1.1.0] - 2024-02-26
- 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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:20-alpine

RUN apk add jq

Expand Down
2 changes: 1 addition & 1 deletion connector-definition/template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "./node_modules/@tsconfig/node18/tsconfig.json"
"extends": "./node_modules/@tsconfig/node20/tsconfig.json"
}
2 changes: 1 addition & 1 deletion ndc-lambda-sdk/bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const tsConfigFileLocation =
? ts.findConfigFile(path.dirname(hostOpts.functions), ts.sys.fileExists)
: undefined
)
?? require.resolve("@tsconfig/node18/tsconfig.json");
?? require.resolve("@tsconfig/node20/tsconfig.json");
const watchMode = hostOpts?.watch ?? false;

const hostScriptPath = path.resolve(__dirname, "../dist/src/host.js")
Expand Down
18 changes: 9 additions & 9 deletions ndc-lambda-sdk/package-lock.json

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

4 changes: 2 additions & 2 deletions ndc-lambda-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
},
"dependencies": {
"@hasura/ndc-sdk-typescript": "^4.2.1",
"@tsconfig/node18": "^18.2.2",
"@tsconfig/node20": "^20.1.2",
"commander": "^11.1.0",
"cross-spawn": "^7.0.3",
"p-limit": "^3.1.0",
"ts-api-utils": "^1.0.3",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"typescript": "^5.3.3"
"typescript": "^5.4.2"
},
"devDependencies": {
"@types/chai": "^4.3.11",
Expand Down
2 changes: 1 addition & 1 deletion ndc-lambda-sdk/src/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function loadTsConfig(functionsFilePath: string): Result<ts.ParsedCommandLine, t
const userTsConfig = ts.findConfigFile(functionsDir, ts.sys.fileExists);
// If the user doesn't have a tsconfig, use this one as a fallback. The TypeScript defaults are bad
// (eg. strict and strictNullChecks is off by default)
const fallbackTsConfig = path.resolve(require.resolve("@tsconfig/node18/tsconfig.json"));
const fallbackTsConfig = path.resolve(require.resolve("@tsconfig/node20/tsconfig.json"));
const configPath = userTsConfig ?? fallbackTsConfig;
const configFile = ts.readConfigFile(configPath, ts.sys.readFile)
if (configFile.error) {
Expand Down
2 changes: 1 addition & 1 deletion ndc-lambda-sdk/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./node_modules/@tsconfig/node18/tsconfig.json",
"extends": "./node_modules/@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"resolveJsonModule": true,
Expand Down
18 changes: 9 additions & 9 deletions yeoman-generator/package-lock.json

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

4 changes: 2 additions & 2 deletions yeoman-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
"yeoman-generator": "^5.10.0"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.2",
"@tsconfig/node20": "^20.1.2",
"@types/pacote": "^11.1.8",
"@types/semver": "^7.5.6",
"@types/yeoman-generator": "^5.2.14",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^11.0.0",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"typescript": "^5.4.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
}
Expand Down
2 changes: 1 addition & 1 deletion yeoman-generator/src/app/templates/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "./node_modules/@tsconfig/node18/tsconfig.json"
"extends": "./node_modules/@tsconfig/node20/tsconfig.json"
}
2 changes: 1 addition & 1 deletion yeoman-generator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./node_modules/@tsconfig/node18/tsconfig.json",
"extends": "./node_modules/@tsconfig/node20/tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"resolveJsonModule": true,
Expand Down