Skip to content

Commit 82f782a

Browse files
feat: Add extension to relative exports in declaration files (#29)
* Add extension to relative imports/exports * Update react integration * Update other integrations
1 parent 9d2ae1b commit 82f782a

18 files changed

Lines changed: 312 additions & 21 deletions

File tree

integrations/react/package.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
{
22
"name": "react-integration",
3+
"version": "0.0.0",
34
"private": true,
45
"type": "module",
6+
"types": "dist/esm/index.d.ts",
7+
"main": "dist/cjs/index.cjs",
8+
"module": "dist/esm/index.js",
9+
"exports": {
10+
".": {
11+
"import": {
12+
"types": "./dist/esm/index.d.ts",
13+
"default": "./dist/esm/index.js"
14+
},
15+
"require": {
16+
"types": "./dist/cjs/index.d.cts",
17+
"default": "./dist/cjs/index.cjs"
18+
}
19+
},
20+
"./package.json": "./package.json"
21+
},
22+
"files": [
23+
"dist"
24+
],
525
"scripts": {
6-
"test:build": "vite build && vitest"
26+
"test:build": "vite build && vitest && publint --strict && attw --pack"
727
},
828
"dependencies": {
29+
"@tanstack/query-core": "^5.17.19",
930
"react": "^18.2.0",
1031
"react-dom": "^18.2.0"
1132
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
"use strict";
22
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3+
const queryCore = require("@tanstack/query-core");
34
const useClient = require("./use-client.cjs");
45
const nested = require("./nested/nested.cjs");
56
exports.Component = useClient.Component;
67
exports.test = nested.test;
8+
Object.keys(queryCore).forEach((k) => {
9+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
10+
Object.defineProperty(exports, k, {
11+
enumerable: true,
12+
get: () => queryCore[k]
13+
});
14+
});
715
//# sourceMappingURL=index.cjs.map

integrations/react/snap/cjs/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from './use-client';
2-
export * from './nested/nested';
1+
export * from '@tanstack/query-core';
2+
export * from './use-client.cjs';
3+
export * from './nested/nested.cjs';
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
export * from './use-client';
2-
export * from './nested/nested';
1+
export * from '@tanstack/query-core';
2+
export * from './use-client.js';
3+
export * from './nested/nested.js';

integrations/react/snap/esm/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integrations/react/snap/esm/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integrations/react/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
export * from '@tanstack/query-core'
12
export * from './use-client'
23
export * from './nested/nested'

integrations/solid/package.json

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
{
22
"name": "solid-integration",
3+
"version": "0.0.0",
34
"private": true,
45
"type": "module",
6+
"types": "dist/esm/index.d.ts",
7+
"main": "dist/cjs/index.cjs",
8+
"module": "dist/esm/index.js",
9+
"exports": {
10+
".": {
11+
"import": {
12+
"types": "./dist/esm/index.d.ts",
13+
"default": "./dist/esm/index.js"
14+
},
15+
"require": {
16+
"types": "./dist/cjs/index.d.cts",
17+
"default": "./dist/cjs/index.cjs"
18+
}
19+
},
20+
"./package.json": "./package.json"
21+
},
22+
"files": [
23+
"dist"
24+
],
525
"scripts": {
6-
"test:build": "vite build && vitest"
26+
"test:build": "vite build && vitest && publint --strict && attw --pack"
727
},
828
"dependencies": {
929
"solid-js": "^1.8.11"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default as App } from './App';
1+
export { default as App } from './App.cjs';

0 commit comments

Comments
 (0)