File tree Expand file tree Collapse file tree 4 files changed +2420
-2454
lines changed
Expand file tree Collapse file tree 4 files changed +2420
-2454
lines changed Original file line number Diff line number Diff line change 2121 fail-fast : false
2222 matrix :
2323 node-version :
24- - 16
2524 - 18
2625 - 20
26+ - 22
2727 steps :
2828 - uses : actions/checkout@v5
2929 - uses : actions/setup-node@v6
3939 - uses : actions/checkout@v5
4040 - uses : actions/setup-node@v6
4141 with :
42- node-version : ' 18 '
42+ node-version : ' 20 '
4343 - run : yarn
4444 - run : yarn test
4545 - uses : codecov/codecov-action@v5
Original file line number Diff line number Diff line change 22 "name" : " wikipedia" ,
33 "version" : " 2.3.0" ,
44 "description" : " A JavaScript wrapper for the wikipedia apis" ,
5- "main" : " dist" ,
5+ "main" : " dist/index.js " ,
66 "engines" : {
77 "node" : " >=10"
88 },
9+ "exports" : {
10+ "import" : " ./dist/index.js" ,
11+ "require" : " ./dist/index.cjs"
12+ },
913 "scripts" : {
10- "prepublishOnly" : " tsc --build --clean && tsc" ,
14+ "prepublishOnly" : " tsc --build --clean && tsc && npx rollup ./dist/index.js --file ./dist/index.cjs --format cjs " ,
1115 "test" : " jest --coverage" ,
12- "build" : " yarn lint && tsc --build --clean && tsc" ,
16+ "build" : " yarn lint && tsc --build --clean && tsc && npx rollup ./dist/index.js --file ./dist/index.cjs --format cjs " ,
1317 "prepare" : " yarn build" ,
1418 "lint" : " eslint source/*.ts" ,
1519 "release" : " np"
3034 "eslint" : " ^8.30.0" ,
3135 "eslint-plugin-tsdoc" : " ^0.2.17" ,
3236 "jest" : " ^29.3.1" ,
37+ "rollup" : " ^4.52.5" ,
3338 "ts-jest" : " ^29.0.3" ,
3439 "typescript" : " ^4.9.4"
3540 },
Original file line number Diff line number Diff line change @@ -663,12 +663,9 @@ wiki.setUserAgent = (userAgent: string) => {
663663 setUserAgent ( userAgent ) ;
664664}
665665
666- export default wiki ;
667- // For CommonJS default export support
668- module . exports = wiki ;
669- module . exports . default = wiki ;
670-
671666export * from './errors' ;
672667export * from './resultTypes' ;
673668export * from './optionTypes' ;
674- export * from './page' ;
669+ export * from './page' ;
670+
671+ export default wiki ;
You can’t perform that action at this time.
0 commit comments