Skip to content

Commit 648c4ca

Browse files
committed
fix: validate correct type exports
1 parent ff1ad2a commit 648c4ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+408
-215
lines changed

.github/workflows/test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ jobs:
3939

4040
- name: Test
4141
run: pnpm run test
42+
43+
- name: Check built types
44+
run: pnpm test:attw
File renamed without changes.

examples/vite-ssr-vue-prerender/auto-imports.d.mts

-17
This file was deleted.

examples/vite-ssr-vue-streaming/auto-imports.d.mts

-17
This file was deleted.

examples/vite-ssr-vue/auto-imports.d.mts

-78
This file was deleted.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
"release:next": "pnpm build && pnpm bump && pnpm publish --tag next -r --no-git-checks",
2323
"lint": "eslint . --fix",
2424
"benchmark": "vitest bench",
25+
"test:attw": "pnpm --filter './packages/**' test:attw",
2526
"lint:docs": "pnpx markdownlint-cli ./docs && pnpx case-police 'docs/**/*.md' *.md",
2627
"lint:docs:fix": "pnpx markdownlint-cli ./docs --fix && pnpx case-police 'docs/**/*.md' *.md --fix",
2728
"twoslash:verify": "nuxt-content-twoslash verify --content-dir docs"
2829
},
2930
"devDependencies": {
31+
"@arethetypeswrong/cli": "0.17.4",
3032
"@antfu/eslint-config": "^4.5.1",
3133
"@types/fs-extra": "^11.0.4",
3234
"@types/jsdom": "^21.1.7",

packages/addons/.attw.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignoreRules": ["cjs-resolves-to-esm"]
3+
}

packages/addons/package.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@
2121
"sideEffects": false,
2222
"exports": {
2323
".": {
24-
"types": "./dist/index.d.mts",
24+
"types": "./dist/index.d.ts",
2525
"default": "./dist/index.mjs"
2626
},
2727
"./vite": {
28-
"types": "./dist/vite.d.mts",
28+
"types": "./dist/vite.d.ts",
2929
"default": "./dist/vite.mjs"
3030
},
3131
"./webpack": {
32-
"types": "./dist/webpack.d.mts",
32+
"types": "./dist/webpack.d.ts",
3333
"default": "./dist/webpack.mjs"
3434
}
3535
},
3636
"main": "dist/index.mjs",
3737
"module": "dist/index.mjs",
38-
"types": "dist/index.d.mts",
38+
"types": "dist/index.d.ts",
3939
"typesVersions": {
4040
"*": {
4141
"vite": [
@@ -47,11 +47,13 @@
4747
}
4848
},
4949
"files": [
50-
"dist"
50+
"dist",
51+
"*.d.ts"
5152
],
5253
"scripts": {
53-
"build": "unbuild .",
54-
"stub": "unbuild . --stub"
54+
"build": "unbuild",
55+
"stub": "unbuild --stub",
56+
"test:attw": "attw --pack"
5557
},
5658
"peerDependencies": {
5759
"unhead": "workspace:*"
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
12
export * from './dist/client'
File renamed without changes.

packages/angular/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
"build": "ng build",
5959
"test": "vitest run",
6060
"test:watch": "vitest",
61-
"test:coverage": "vitest run --coverage"
61+
"test:coverage": "vitest run --coverage",
62+
"test:attw": "true"
6263
},
6364
"typings": "./dist/index.d.ts",
6465
"peerDependencies": {

packages/react/.attw.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignoreRules": ["cjs-resolves-to-esm"]
3+
}
File renamed without changes.

packages/react/package.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@
1717
"sideEffects": false,
1818
"exports": {
1919
".": {
20-
"types": "./dist/index.d.mts",
20+
"types": "./dist/index.d.ts",
2121
"default": "./dist/index.mjs"
2222
},
2323
"./server": {
24-
"types": "./dist/server.d.mts",
24+
"types": "./dist/server.d.ts",
2525
"default": "./dist/server.mjs"
2626
},
2727
"./client": {
28-
"types": "./dist/client.d.mts",
28+
"types": "./dist/client.d.ts",
2929
"default": "./dist/client.mjs"
3030
},
3131
"./utils": {
32-
"types": "./dist/utils.d.mts",
32+
"types": "./dist/utils.d.ts",
3333
"default": "./dist/utils.mjs"
3434
},
3535
"./plugins": {
36-
"types": "./dist/plugins.d.mts",
36+
"types": "./dist/plugins.d.ts",
3737
"default": "./dist/plugins.mjs"
3838
}
3939
},
4040
"main": "dist/index.mjs",
4141
"module": "dist/index.mjs",
42-
"types": "dist/index.d.mts",
42+
"types": "dist/index.d.ts",
4343
"typesVersions": {
4444
"*": {
4545
"server": [
@@ -57,13 +57,14 @@
5757
}
5858
},
5959
"files": [
60-
"*.d.mts",
60+
"*.d.ts",
6161
"dist"
6262
],
6363
"scripts": {
64-
"build": "unbuild .",
65-
"stub": "unbuild . --stub",
66-
"export:sizes": "npx export-size . -r"
64+
"build": "unbuild",
65+
"stub": "unbuild --stub",
66+
"export:sizes": "npx export-size . -r",
67+
"test:attw": "attw --pack"
6768
},
6869
"peerDependencies": {
6970
"react": ">=19"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/schema-org/.attw.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignoreRules": ["cjs-resolves-to-esm"]
3+
}

packages/schema-org/package.json

+9-10
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@
2727
"sideEffects": false,
2828
"exports": {
2929
".": {
30-
"types": "./dist/index.d.mts",
30+
"types": "./dist/index.d.ts",
3131
"default": "./dist/index.mjs"
3232
},
3333
"./vue": {
34-
"types": "./dist/vue.d.mts",
34+
"types": "./dist/vue.d.ts",
3535
"default": "./dist/vue.mjs"
3636
},
3737
"./svelte": {
38-
"types": "./dist/svelte.d.mts",
38+
"types": "./dist/svelte.d.ts",
3939
"default": "./dist/svelte.mjs"
4040
},
4141
"./react": {
42-
"types": "./dist/react.d.mts",
42+
"types": "./dist/react.d.ts",
4343
"default": "./dist/react.mjs"
4444
},
4545
"./solid-js": {
46-
"types": "./dist/solid-js.d.mts",
46+
"types": "./dist/solid-js.d.ts",
4747
"default": "./dist/solid-js.mjs"
4848
}
4949
},
5050
"main": "dist/index.mjs",
5151
"module": "dist/index.mjs",
52-
"types": "dist/index.d.mts",
52+
"types": "dist/index.d.ts",
5353
"typesVersions": {
5454
"*": {
5555
"vue": [
@@ -67,15 +67,14 @@
6767
}
6868
},
6969
"files": [
70-
"*.d.mts",
70+
"*.d.ts",
7171
"dist"
7272
],
7373
"scripts": {
7474
"build": "unbuild .",
7575
"stub": "unbuild . --stub",
76-
"test": "vitest",
77-
"release": "bumpp package.json --commit --push --tag",
78-
"lint": "eslint \"{src,test}/**/*.{ts,vue,json,yml}\" --fix"
76+
"lint": "eslint \"{src,test}/**/*.{ts,vue,json,yml}\" --fix",
77+
"test:attw": "attw --pack"
7978
},
8079
"peerDependencies": {
8180
"@unhead/react": "^2",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/solid-js/.attw.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignoreRules": ["cjs-resolves-to-esm"]
3+
}
File renamed without changes.

packages/solid-js/package.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@
1717
"sideEffects": false,
1818
"exports": {
1919
".": {
20-
"types": "./dist/index.d.mts",
20+
"types": "./dist/index.d.ts",
2121
"default": "./dist/index.mjs"
2222
},
2323
"./server": {
24-
"types": "./dist/server.d.mts",
24+
"types": "./dist/server.d.ts",
2525
"default": "./dist/server.mjs"
2626
},
2727
"./client": {
28-
"types": "./dist/client.d.mts",
28+
"types": "./dist/client.d.ts",
2929
"default": "./dist/client.mjs"
3030
},
3131
"./utils": {
32-
"types": "./dist/utils.d.mts",
32+
"types": "./dist/utils.d.ts",
3333
"default": "./dist/utils.mjs"
3434
},
3535
"./plugins": {
36-
"types": "./dist/plugins.d.mts",
36+
"types": "./dist/plugins.d.ts",
3737
"default": "./dist/plugins.mjs"
3838
}
3939
},
4040
"main": "dist/index.mjs",
4141
"module": "dist/index.mjs",
42-
"types": "dist/index.d.mts",
42+
"types": "dist/index.d.ts",
4343
"typesVersions": {
4444
"*": {
4545
"server": [
@@ -57,13 +57,14 @@
5757
}
5858
},
5959
"files": [
60-
"*.d.mts",
60+
"*.d.ts",
6161
"dist"
6262
],
6363
"scripts": {
64-
"build": "unbuild .",
65-
"stub": "unbuild . --stub",
66-
"test": "vitest"
64+
"build": "unbuild",
65+
"stub": "unbuild --stub",
66+
"test": "vitest",
67+
"test:attw": "attw --pack"
6768
},
6869
"peerDependencies": {
6970
"solid-js": ">=19"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/svelte/.attw.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignoreRules": ["cjs-resolves-to-esm"]
3+
}

packages/svelte/client.d.mts

-1
This file was deleted.

packages/svelte/client.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './dist/client.js'

0 commit comments

Comments
 (0)