Skip to content

Fix vite-plugin-dts issues + add installation test #94

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
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ jobs:
#- run: npm run build --if-present
- run: npm run verify verify:source
- run: npm test
- run: cd tests/installation && npm ci && npm test
1 change: 1 addition & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"linter": {
"enabled": true,
"include": ["app/**/*", "src/**/*", "tests/**/*"],
"ignore": ["tests/installation/**/*"],
"rules": {
"recommended": true,
"complexity": {
Expand Down
313 changes: 122 additions & 191 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"glob": "^11.0.0",
"vite": "^5.4.11",
"@vitejs/plugin-react": "^4.3.4",
"vite-plugin-dts": "^4.3.0",
"vite-plugin-dts": "^4.4.0",
"vite-plugin-lib-inject-css": "^2.1.1",
"vite-plugin-svg-icons": "^2.0.1",
"typescript": "^5.7.2",
Expand Down
2 changes: 1 addition & 1 deletion package.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const packageConfig = {
// Build
'vite': '^5.4.11', // Cannot use vite v6, blocked by https://github.com/privatenumber/vite-css-modules/issues/13
'@vitejs/plugin-react': '^4.3.4',
'vite-plugin-dts': '^4.3.0',
'vite-plugin-dts': '^4.4.0',
'vite-plugin-lib-inject-css': '^2.1.1',
'vite-plugin-svg-icons': '^2.0.1',

Expand Down
1 change: 0 additions & 1 deletion scripts/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as pathUtil from 'node:path';
import { fileURLToPath } from 'node:url';
import { type PathLike, createReadStream } from 'node:fs';
import * as fs from 'node:fs/promises';
import { exec } from 'node:child_process';
import { AsyncLocalStorage } from 'node:async_hooks';


Expand Down
24 changes: 24 additions & 0 deletions tests/installation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
28 changes: 28 additions & 0 deletions tests/installation/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
13 changes: 13 additions & 0 deletions tests/installation/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fortanix Baklava</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading
Loading