Skip to content

Commit

Permalink
Switch to package exports (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer authored Apr 3, 2023
1 parent ba77fe3 commit 286d98d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-impalas-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/foundry': major
---

Changed the [package entry points](https://nodejs.org/api/packages.html#package-entry-points) to use the `exports` instead of the `main` field in the `package.json` file.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ To publish a pre-release version, check out on the branch for your release chann

```sh
git checkout next # or `canary`
npm run changeset pre enter next # or `canary`
npx changeset pre enter next # or `canary`
```

This will generate a `pre.json` file in the `.changeset` directory.
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
"name": "@sumup/foundry",
"version": "6.0.0-next.0",
"description": "A toolkit for JavaScript + TypeScript applications by SumUp.",
"main": "index.js",
"repository": "https://github.com/sumup-oss/foundry",
"author": "Felix Jung <felix.jung@sumup.com>, Connor Bär <connor.baer@sumup.com>",
"license": "Apache-2.0",
"bin": "cli/index.js",
"bin": "dist/cli/index.js",
"exports": {
"eslint": "./dist/eslint.js",
"husky": "./dist/husky.js",
"lint-staged": "./dist/lint-staged.js",
"prettier": "./dist/prettier.js"
},
"scripts": {
"build": "npm run cleanup && npm run copy && tsc && chmod +x dist/cli/index.js",
"dev": "npm run cleanup && npm run copy && tsc --watch",
"build": "npm run cleanup && tsc && chmod +x dist/cli/index.js",
"dev": "npm run cleanup && tsc --watch",
"start": "npm run dev",
"cleanup": "rimraf ./dist && mkdir dist",
"copy": "cp package.json dist/package.json && cp LICENSE dist/LICENSE && cp README.md dist/README.md",
"prelint": "npm run build",
"lint": "eslint src --ext .js,.jsx,.json,.ts,.tsx",
"lint:fix": "npm run lint -- --fix",
Expand All @@ -31,9 +35,6 @@
"node 14.17",
"node 16"
],
"foundry": {
"publish": true
},
"dependencies": {
"@babel/core": "^7.21.4",
"@babel/eslint-parser": "^7.21.3",
Expand Down

0 comments on commit 286d98d

Please sign in to comment.