Skip to content

Commit

Permalink
feat: move to an esm first approach
Browse files Browse the repository at this point in the history
migrates package to a be esm-module first and commonjs second. this fixes issues when importing into
an esm module.
  • Loading branch information
TimoBechtel committed Nov 15, 2022
1 parent 20e7a47 commit c3b55a2
Show file tree
Hide file tree
Showing 6 changed files with 631 additions and 1,158 deletions.
6 changes: 0 additions & 6 deletions .prettierrc.js

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
useTabs: true
singleQuote: true
semi: true
trailingComma: 'es5'
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverage: true,
Expand Down
33 changes: 21 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@
"repository": "git@github.com:TimoBechtel/krog.git",
"author": "Timo Bechtel <hi@timobechtel.com>",
"license": "MIT",
"type": "module",
"source": "src/index.ts",
"main": "dist/main.js",
"module": "dist/module.js",
"types": "dist/types.d.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
"keywords": [
"hooks",
"hookable",
Expand All @@ -26,16 +35,16 @@
"package.json"
],
"devDependencies": {
"@parcel/packager-ts": "2.3.2",
"@parcel/transformer-typescript-types": "2.3.2",
"@parcel/packager-ts": "2.8.0",
"@parcel/transformer-typescript-types": "2.8.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.21",
"jest": "^27.5.1",
"parcel": "^2.3.2",
"semantic-release": "^19.0.2",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5"
"@types/jest": "^29.2.3",
"@types/node": "^18.11.9",
"jest": "^29.3.1",
"parcel": "^2.8.0",
"semantic-release": "^19.0.5",
"ts-jest": "^29.0.3",
"typescript": "^4.8.4"
}
}
Loading

0 comments on commit c3b55a2

Please sign in to comment.