Skip to content

Commit

Permalink
fix: swich module to commonjs for increased compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip committed Feb 1, 2023
1 parent 448601e commit e23f2d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
export default {
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.[tj]s$': [
'ts-jest',
{
useESM: true,
},
],
},
testMatch: ['<rootDir>/src/**/__tests__/*.spec.ts'],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/stoplightio/path"
},
"license": "Apache-2.0",
"type": "module",
"type": "commonjs",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
Expand Down Expand Up @@ -44,7 +44,7 @@
"test.prod": "yarn lint && yarn test --coverage --maxWorkers=2",
"test.update": "yarn test --updateSnapshot",
"test.watch": "yarn test --watch",
"yalc": "yarn build && (cd dist && yalc push)",
"yalc": "yarn build && yalc push",
"yalc.watch": "nodemon --watch 'src/**/*' --exec 'yarn yalc'"
},
"peerDependencies": {},
Expand Down

0 comments on commit e23f2d9

Please sign in to comment.