Skip to content

Commit

Permalink
Require Node.js 18.20 and move to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 30, 2024
1 parent 624749c commit 8d668e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .github/funding.yml

This file was deleted.

2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ console.log(jsTypes);
*/
declare const jsTypes: readonly string[];

export = jsTypes;
export default jsTypes;
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';
import jsTypes from './js-types.json' with {type: 'json'};

module.exports = require('./js-types.json');
export default jsTypes;
19 changes: 8 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@
"email": "[email protected]",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"sideEffects": false,
"engines": {
"node": ">=18"
"node": ">=18.20"
},
"scripts": {
"test": "xo && ava && tsc index.d.ts"
"//test": "xo && ava && tsc index.d.ts",
"test": "ava && tsc index.d.ts"
},
"files": [
"index.js",
Expand All @@ -38,14 +41,8 @@
"json"
],
"devDependencies": {
"ava": "^1.4.1",
"typescript": "^5.2.2",
"xo": "^0.24.0"
},
"xo": {
"rules": {
"import/extensions": "off",
"unicorn/import-index": "off"
}
"ava": "^6.1.2",
"typescript": "^5.4.5",
"xo": "^0.58.0"
}
}

0 comments on commit 8d668e6

Please sign in to comment.