Skip to content

Commit af106c0

Browse files
feat: package is now ESM (#237)
BREAKING CHANGE: package is now ESM --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Oscar Dominguez <[email protected]>
1 parent 22c9acd commit af106c0

File tree

7 files changed

+212
-95
lines changed

7 files changed

+212
-95
lines changed

package-lock.json

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

package.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
"publishConfig": {
44
"access": "public"
55
},
6+
"type": "module",
67
"version": "0.0.0-development",
78
"description": "Convenience method to create/edit/delete a text file based on its current content",
89
"scripts": {
910
"build": "node scripts/build.mjs && tsc -p tsconfig.json",
1011
"lint": "prettier --check '{src,test}/**/*' README.md package.json",
1112
"lint:fix": "prettier --write '{src,test}/**/*' README.md package.json",
1213
"pretest": "npm run -s lint",
13-
"test": "jest --coverage"
14+
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --coverage"
1415
},
1516
"repository": "https://github.com/octokit/plugin-create-or-update-text-file.js",
1617
"keywords": [
@@ -19,11 +20,11 @@
1920
"author": "Gregor Martynus (https://dev.to/gr2m)",
2021
"license": "MIT",
2122
"dependencies": {
22-
"@octokit/request-error": "^5.0.0",
23+
"@octokit/request-error": "^6.0.0",
2324
"@octokit/types": "^12.0.0"
2425
},
2526
"devDependencies": {
26-
"@octokit/core": "^5.0.0",
27+
"@octokit/core": "^6.0.1",
2728
"@octokit/tsconfig": "^3.0.0",
2829
"@types/jest": "^29.5.2",
2930
"@types/node": "^20.0.0",
@@ -38,14 +39,18 @@
3839
"typescript": "^5.0.0"
3940
},
4041
"peerDependencies": {
41-
"@octokit/core": ">= 5"
42+
"@octokit/core": ">=6"
4243
},
4344
"jest": {
45+
"extensionsToTreatAsEsm": [
46+
".ts"
47+
],
4448
"transform": {
4549
"^.+\\.(ts|tsx)$": [
4650
"ts-jest",
4751
{
48-
"tsconfig": "test/tsconfig.test.json"
52+
"tsconfig": "test/tsconfig.test.json",
53+
"useESM": true
4954
}
5055
]
5156
},
@@ -56,6 +61,9 @@
5661
"functions": 100,
5762
"lines": 100
5863
}
64+
},
65+
"moduleNameMapper": {
66+
"^(.+)\\.jsx?$": "$1"
5967
}
6068
},
6169
"release": {

0 commit comments

Comments
 (0)