Skip to content

Commit eab9547

Browse files
committed
fix: 🐛 exporte DsfrDataTable
1 parent 53a0627 commit eab9547

File tree

8 files changed

+1093
-825
lines changed

8 files changed

+1093
-825
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
run: pnpm install --frozen-lockfile
3131
- name: Lint (show only errors)
3232
run: pnpm lint --quiet
33+
- name: Check exports
34+
run: pnpm check-exports-ci
3335
- name: Test
3436
run: pnpm test
3537
- name: Install Playwright

ci/check-exports.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ const isCI = process.argv.includes('--ci')
1414
const getNormalizedDir = (relativeDir) => fileURLToPath(new URL(relativeDir, import.meta.url))
1515

1616
// const sfcs = await globby(fileURLToPath(new URL('../src/components/**/*.vue', import.meta.url)))
17-
const sfcs = await globby('src/components/**/*.vue')
17+
const sfcs = (await globby('src/components/**/*.{vue,types.ts}'))
18+
.filter(path => !/Demo|Example/.test(path))
19+
.map(path => path.replace(/^(.*).types.ts$/, '$1.types'))
1820

19-
const projectFn = component => `export { default as ${path.basename(component, '.vue')} } from '${component.replace('src/components', '.')}'`
21+
const projectFn = component => component.endsWith('types')
22+
? `export * from '${component.replace('src/components', '.')}'`
23+
: `export { default as ${path.basename(component, '.vue')} } from '${component.replace('src/components', '.')}'`
2024

2125
const correctComponentList = sfcs.map(projectFn).sort()
2226
const correctString = `${correctComponentList.join('\n')}\n`

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,10 @@ export default antfu({
6969
'storybook/use-storybook-testing-library': 'error',
7070
},
7171
},
72+
{
73+
files: ['src/components/index.ts'],
74+
rules: {
75+
'perfectionist/sort-exports': 'off',
76+
},
77+
},
7278
])

package.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@
7878
"@gouvfr/dsfr": "~1.12.1",
7979
"focus-trap": "^7.5.4",
8080
"focus-trap-vue": "^4.0.3",
81-
"vue": "^3.4.38",
82-
"vue-router": "^4.4.3"
81+
"pnpm": "^9.10.0",
82+
"vue": "^3.5.4",
83+
"vue-router": "^4.4.4"
8384
},
8485
"devDependencies": {
85-
"@antfu/eslint-config": "^3.0.0",
86-
"@chromatic-com/storybook": "^1.8.0",
86+
"@antfu/eslint-config": "^3.5.1",
87+
"@chromatic-com/storybook": "^2.0.0",
8788
"@commitlint/cli": "^19.4.1",
8889
"@commitlint/config-conventional": "^19.4.1",
8990
"@iconify/vue": "^4.1.2",
@@ -106,7 +107,7 @@
106107
"@testing-library/user-event": "^14.5.2",
107108
"@testing-library/vue": "^8.1.0",
108109
"@types/jsdom": "^21.1.7",
109-
"@types/node": "^20.16.2",
110+
"@types/node": "^20.16.5",
110111
"@vitejs/plugin-vue": "^5.1.3",
111112
"@vitejs/plugin-vue-jsx": "^4.0.1",
112113
"@vue/test-utils": "^2.4.6",
@@ -116,31 +117,34 @@
116117
"@whyframe/core": "^0.1.11",
117118
"@whyframe/vue": "^0.1.7",
118119
"browserslist": "^4.23.3",
120+
"chalk": "^5.3.0",
119121
"commitlint": "^19.4.1",
120122
"cross-env": "^7.0.3",
121-
"eslint": "^9.9.1",
122-
"eslint-plugin-vue": "^9.27.0",
123+
"eslint": "^9.10.0",
124+
"eslint-plugin-vue": "^9.28.0",
125+
"globby": "^14.0.2",
123126
"husky": "^9.1.5",
127+
"inquirer": "^10.2.2",
124128
"jsdom": "^25.0.0",
125-
"lightningcss": "^1.26.0",
126-
"lint-staged": "^15.2.9",
129+
"lightningcss": "^1.27.0",
130+
"lint-staged": "^15.2.10",
127131
"npm-run-all": "^4.1.5",
128132
"p-debounce": "^4.0.0",
129-
"playwright": "^1.46.1",
133+
"playwright": "^1.47.0",
130134
"publint": "^0.2.10",
131135
"regenerator-runtime": "^0.14.1",
132136
"rimraf": "^6.0.1",
133-
"semantic-release": "^24.1.0",
134-
"start-server-and-test": "^2.0.5",
137+
"semantic-release": "^24.1.1",
138+
"start-server-and-test": "^2.0.7",
135139
"storybook": "^8.2.9",
136140
"typescript": "~5.5.4",
137-
"vite": "^5.4.2",
141+
"vite": "^5.4.4",
138142
"vite-node": "^2.0.5",
139143
"vite-plugin-full-reload": "^1.2.0",
140144
"vitepress": "^1.3.4",
141145
"vitest": "^2.0.5",
142146
"vue-demi": "^0.14.10",
143-
"vue-tsc": "^2.1.2"
147+
"vue-tsc": "^2.1.6"
144148
},
145149
"lint-staged": {
146150
"*.{vue,js,jsx,ts,tsx}": "run-s check-exports-ci lint --"

0 commit comments

Comments
 (0)