Skip to content

feat: Add explicit package.json type field #5505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: Add explicit package.json type field
  • Loading branch information
lachlancollins committed Jun 1, 2023
commit c837f02418b44009cc3b9176f30455df87856b38
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "query",
"repository": "https://github.com/tanstack/query.git",
"packageManager": "[email protected]",
"type": "module",
"scripts": {
"clean": "pnpm --filter \"./packages/**\" run clean",
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...'); process.exit(1)}\" || npx -y only-allow pnpm",
Expand Down
1 change: 1 addition & 0 deletions packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"exports": {
"./package.json": "./package.json"
},
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"main": "build/lib/index.js",
"exports": {
".": {
Expand Down
1 change: 1 addition & 0 deletions packages/query-async-storage-persister/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/query-broadcast-client-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/query-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/types/index.d.ts",
"main": "build/umd/index.js",
"module": "build/esm/index.mjs",
Expand Down
1 change: 1 addition & 0 deletions packages/query-persist-client-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/query-sync-storage-persister/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/react-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/react-query-persist-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
1 change: 1 addition & 0 deletions packages/solid-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/types/index.d.ts",
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/svelte-query-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"type": "module",
"types": "build/lib/index.d.ts",
"module": "build/lib/index.js",
"svelte": "./build/lib/index.js",
"exports": {
".": {
"types": "./build/lib/index.d.ts",
"import": "./build/lib/index.js",
"svelte": "./build/lib/index.js",
"default": "./build/lib/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/svelte-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"type": "module",
"types": "build/lib/index.d.ts",
"module": "build/lib/index.js",
"svelte": "./build/lib/index.js",
"exports": {
".": {
"types": "./build/lib/index.d.ts",
"import": "./build/lib/index.js",
"svelte": "./build/lib/index.js",
"default": "./build/lib/index.js"
},
"./package.json": "./package.json"
Expand Down
1 change: 1 addition & 0 deletions packages/vue-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"type": "commonjs",
"types": "build/lib/index.d.ts",
"main": "build/lib/index.js",
"module": "build/lib/index.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions scripts/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ export const packages = [
{
name: '@tanstack/svelte-query',
packageDir: 'packages/svelte-query',
entries: ['module', 'types'],
entries: ['module', 'svelte', 'types'],
},
{
name: '@tanstack/svelte-query-devtools',
packageDir: 'packages/svelte-query-devtools',
entries: ['module', 'types'],
entries: ['module', 'svelte', 'types'],
},
{
name: '@tanstack/vue-query',
Expand Down
2 changes: 1 addition & 1 deletion scripts/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type Parsed = {
export type Package = {
name: string
packageDir: string
entries: Array<'main' | 'module' | 'types'>
entries: Array<'main' | 'module' | 'svelte' | 'types'>
}

export type BranchConfig = {
Expand Down