Skip to content

Commit

Permalink
Add exports field to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed Jan 15, 2024
1 parent 1695a35 commit 74154ca
Show file tree
Hide file tree
Showing 11 changed files with 121 additions and 27 deletions.
12 changes: 12 additions & 0 deletions .changeset/happy-flowers-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@ts-gql/apollo": patch
"@ts-gql/babel-plugin": patch
"@ts-gql/compiler": patch
"@ts-gql/config": patch
"@ts-gql/eslint-plugin": patch
"@ts-gql/fetch": patch
"@ts-gql/next": patch
"@ts-gql/tag": patch
---

Add `exports` field to `package.json`
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@changesets/changelog-github": "^0.4.7",
"@changesets/cli": "^2.25.0",
"@manypkg/cli": "0.19.2",
"@preconstruct/cli": "^2.2.2",
"@preconstruct/cli": "^2.8.3",
"@ts-gql/eslint-plugin": "*",
"@types/jest": "^29.1.2",
"@typescript-eslint/eslint-plugin": "^5.40.0",
Expand Down Expand Up @@ -49,6 +49,7 @@
"packages": [
"packages/*"
],
"distFilenameStrategy": "unscoped-package-name"
"distFilenameStrategy": "unscoped-package-name",
"exports": true
}
}
7 changes: 7 additions & 0 deletions packages/apollo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"version": "0.12.0",
"main": "dist/apollo.cjs.js",
"module": "dist/apollo.esm.js",
"exports": {
".": {
"module": "./dist/apollo.esm.js",
"default": "./dist/apollo.cjs.js"
},
"./package.json": "./package.json"
},
"license": "MIT",
"dependencies": {
"@ts-gql/tag": "^0.7.0"
Expand Down
7 changes: 7 additions & 0 deletions packages/babel-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"version": "0.1.0",
"main": "dist/babel-plugin.cjs.js",
"module": "dist/babel-plugin.esm.js",
"exports": {
".": {
"module": "./dist/babel-plugin.esm.js",
"default": "./dist/babel-plugin.cjs.js"
},
"./package.json": "./package.json"
},
"files": [
"dist",
"!**/*.d.ts"
Expand Down
11 changes: 11 additions & 0 deletions packages/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
"version": "0.16.4",
"main": "dist/compiler.cjs.js",
"module": "dist/compiler.esm.js",
"exports": {
"./cli": {
"module": "./cli/dist/compiler.esm.js",
"default": "./cli/dist/compiler.cjs.js"
},
".": {
"module": "./dist/compiler.esm.js",
"default": "./dist/compiler.cjs.js"
},
"./package.json": "./package.json"
},
"license": "MIT",
"files": [
"dist",
Expand Down
7 changes: 7 additions & 0 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"version": "0.9.1",
"main": "dist/config.cjs.js",
"module": "dist/config.esm.js",
"exports": {
".": {
"module": "./dist/config.esm.js",
"default": "./dist/config.cjs.js"
},
"./package.json": "./package.json"
},
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.9.2",
Expand Down
7 changes: 7 additions & 0 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"version": "0.9.0",
"main": "dist/eslint-plugin.cjs.js",
"module": "dist/eslint-plugin.esm.js",
"exports": {
".": {
"module": "./dist/eslint-plugin.esm.js",
"default": "./dist/eslint-plugin.cjs.js"
},
"./package.json": "./package.json"
},
"license": "MIT",
"files": [
"dist"
Expand Down
7 changes: 7 additions & 0 deletions packages/fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"version": "0.1.2",
"main": "dist/fetch.cjs.js",
"module": "dist/fetch.esm.js",
"exports": {
".": {
"module": "./dist/fetch.esm.js",
"default": "./dist/fetch.cjs.js"
},
"./package.json": "./package.json"
},
"license": "MIT",
"dependencies": {
"@ts-gql/tag": "^0.7.0"
Expand Down
7 changes: 7 additions & 0 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"version": "17.0.0",
"main": "dist/next.cjs.js",
"module": "dist/next.esm.js",
"exports": {
".": {
"module": "./dist/next.esm.js",
"default": "./dist/next.cjs.js"
},
"./package.json": "./package.json"
},
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.9.2"
Expand Down
11 changes: 11 additions & 0 deletions packages/tag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
"version": "0.7.0",
"main": "dist/tag.cjs.js",
"module": "dist/tag.esm.js",
"exports": {
".": {
"module": "./dist/tag.esm.js",
"default": "./dist/tag.cjs.js"
},
"./no-transform": {
"module": "./no-transform/dist/tag.esm.js",
"default": "./no-transform/dist/tag.cjs.js"
},
"./package.json": "./package.json"
},
"license": "MIT",
"types": "index.d.ts",
"dependencies": {
Expand Down
67 changes: 42 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 74154ca

Please sign in to comment.