Skip to content

Commit

Permalink
Upgrade to node 18 and start to fix breakages
Browse files Browse the repository at this point in the history
Node 18 beomes active LTS in October, and is desirable because
it includes a native `fetch` implementation and support for web streams,
meaning that `fetch` should work the same in browser and node for almost
all functionality (this all started when looking for `body.getReader()`).

Unfortunately this breaks a bunch of stuff, like all our tests using msw to
mock HTTP API, since msw can not currently intercept requests from Undici,
see: mswjs/interceptors#159

Currently looking for best solution to this
  • Loading branch information
milesrichardson committed Aug 25, 2022
1 parent a01ea99 commit e97712e
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.15.1
v18.8.0
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
"packages/*"
],
"devDependencies": {
"@types/node": "16.11.38",
"@vitejs/plugin-react": "^1.3.2",
"@types/node": "18.7.13",
"@vitejs/plugin-react": "2.0.1",
"@vitest/coverage-c8": "0.22.1",
"c8": "7.11.3",
"global-agent": "3.0.0",
"jsdom": "19.0.0",
"msw": "0.43.1",
"jsdom": "20.0.0",
"msw": "0.45.0",
"prettier": "2.7.1",
"rimraf": "3.0.2",
"tsc-multi": "0.6.1",
"typescript": "4.7.4",
"undici": "5.10.0",
"verdaccio": "5.13.1",
"vitest": "0.22.1",
"wireit": "0.7.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/ast-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"debug": "yarn run esno --inspect-brk=127.0.0.1:9229 parse-ast.ts"
},
"devDependencies": {
"@types/node": "16.11.38"
"@types/node": "18.7.13"
},
"dependencies": {
"chalk": "5.0.1",
Expand Down
6 changes: 0 additions & 6 deletions packages/base-db/base-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,3 @@ export abstract class BaseDb<ConcretePluginMap extends PluginMap>
return sql.trim().replace(/(?:\r\n|\r|\n)/g, " ");
}
}

declare module "node:crypto" {
namespace webcrypto {
const subtle: SubtleCrypto;
}
}
2 changes: 1 addition & 1 deletion packages/client-http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@madatdata/test-helpers": "workspace:*",
"@types/node": "16.11.38"
"@types/node": "18.7.13"
},
"peerDependencies": {
"cross-fetch": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/client-postgres/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.ts",
"types": "./build/es2020/index.d.ts",
"devDependencies": {
"@types/node": "16.11.38",
"@types/node": "18.7.13",
"postgres": "3.2.4"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@madatdata/test-helpers": "workspace:*",
"@types/node": "16.11.38",
"@types/node": "18.7.13",
"cross-fetch": "3.1.5"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/db-seafowl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@madatdata/test-helpers": "workspace:*",
"@types/node": "16.11.38",
"@types/node": "18.7.13",
"cross-fetch": "3.1.5"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/db-splitgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@graphql-codegen/typescript": "2.7.1",
"@graphql-codegen/typescript-operations": "2.5.1",
"@madatdata/test-helpers": "workspace:*",
"@types/node": "16.11.38",
"@types/node": "18.7.13",
"cross-fetch": "3.1.5",
"esno": "0.16.3",
"json-schema-to-typescript": "10.1.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"devDependencies": {
"@madatdata/test-helpers": "workspace:*",
"@testing-library/react": "^12 || ^13",
"@types/node": "16.11.38",
"@types/node": "18.7.13",
"@types/react": ">=17 || >=18",
"@types/react-dom": ">=17 || >=18",
"cross-fetch": "3.1.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/yeet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"typescript": "4.7.4"
},
"devDependencies": {
"@types/node": "16.11.38"
"@types/node": "18.7.13"
}
}

0 comments on commit e97712e

Please sign in to comment.