Skip to content

Commit 8f7f7a8

Browse files
committed
Update ky to 0.3->1.0, node 16->18 and add tsimp TS loader
After replacing got package with ky the builds started to fail. This fixes #572
1 parent 15c084d commit 8f7f7a8

File tree

9 files changed

+207
-172
lines changed

9 files changed

+207
-172
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ yarn-error.log*
2424

2525
.next/
2626
.vercel/
27+
28+
# tsimp build caches
29+
.tsimp

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.snapshots/
22
.next/
33
.vercel/
4+
.tsimp/
45
build/
56
docs/

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FIXME: Remove this file when actions/setup-node supports .mise.toml
22
# See more: https://github.com/actions/setup-node/issues/787
3-
nodejs 16.20.2
3+
nodejs 18.20.4
44

55
# node-gyp has issues with newer python versions.
66
# This is the latest version of 3.10.x as of October 2024

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
"prettier": "^2.7.1",
5757
"ts-node": "^10.9.1",
5858
"tsup": "^6.2.3",
59-
"typescript": "^4.8.4"
59+
"typescript": "^4.8.4",
60+
"tsimp": "2.0.11"
6061
},
6162
"lint-staged": {
6263
"*.{ts,tsx}": [

packages/notion-client/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
"build"
1616
],
1717
"engines": {
18-
"node": ">=14.8"
18+
"node": ">=18"
1919
},
2020
"scripts": {
2121
"build": "tsup",
2222
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
2323
"test": "ava"
2424
},
2525
"dependencies": {
26-
"ky": "^0.31.4",
26+
"ky": "^1.0.0",
2727
"notion-types": "^6.16.1",
2828
"notion-utils": "^6.16.1",
2929
"p-map": "^5.3.0"
@@ -34,6 +34,7 @@
3434
"ts": "module"
3535
},
3636
"nodeArguments": [
37+
"--import=tsimp",
3738
"--loader=ts-node/esm",
3839
"--no-warnings",
3940
"--experimental-specifier-resolution=node"
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
// This adds Node.js support for `fetch` and `abort-controller`
2-
import 'ky-universal'
3-
41
export { NotionAPI } from './notion-api'

packages/notion-compat/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"ts": "module"
4040
},
4141
"nodeArguments": [
42+
"--import=tsimp",
4243
"--loader=ts-node/esm",
4344
"--no-warnings",
4445
"--experimental-specifier-resolution=node"

packages/notion-utils/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"ts": "module"
4141
},
4242
"nodeArguments": [
43+
"--import=tsimp",
4344
"--loader=ts-node/esm",
4445
"--no-warnings",
4546
"--experimental-specifier-resolution=node"

0 commit comments

Comments
 (0)