Skip to content
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
6 changes: 5 additions & 1 deletion .github/actions/node-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ runs:
run: |
yarn config set winLinkType symlinks
if [ "${{ inputs.strict }}" = "true" ]; then
echo "Installing with strict mode"
yarn install --immutable --check-resolutions --refresh-lockfile
echo "Checking peerDeps and constraints"
yarn check:pkgs
echo "Running npm audit"
yarn npm audit --all
else
yarn install
YARN_ENABLE_HARDENED_MODE=0 yarn install --no-immutable
fi
shell: bash
710 changes: 355 additions & 355 deletions .yarn/releases/yarn-4.9.2.cjs → .yarn/releases/yarn-4.10.3.cjs

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ compressionLevel: mixed

enableGlobalCache: true

enableHardenedMode: false

globalFolder: ./.yarn/cache/global

nodeLinker: pnpm

packageExtensions:
"prettier-eslint@*":
prettier-eslint@*:
dependencies:
"typescript": "*"
typescript: "*"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v3"

yarnPath: .yarn/releases/yarn-4.9.2.cjs
yarnPath: .yarn/releases/yarn-4.10.3.cjs
5 changes: 2 additions & 3 deletions configs/eslint-config-custom/eslint.config.base.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// @ts-check

import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import eslintConfigPrettier from "eslint-config-prettier";

export default tseslint.config(
export default defineConfig(
// == Formatting =============================================================
// @ts-ignore
eslintPluginPrettierRecommended,
Expand Down
12 changes: 9 additions & 3 deletions configs/eslint-config-custom/eslint.config.typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@

import { cwd } from "node:process";
import globals from "globals";
import { defineConfig } from "eslint/config";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import baseConfig from "./eslint.config.base.js";

/** @typedef {import("typescript-eslint").InfiniteDepthConfigWithExtends} TSConfig */
/** @typedef {import("typescript-eslint").ConfigArray} ConfigArray */
/** @typedef {import("eslint").Linter.Config} Config */
/** @typedef {Config[]} ConfigArray */

/**
* @export
* @type {(userConfigs?: TSConfig) => ConfigArray}
*/
export function eslintConfig(userConfigs = []) {
return tseslint.config(
const normalizedUserConfigs = /** @type {ConfigArray} */ (
Array.isArray(userConfigs) ? userConfigs : [userConfigs ?? {}]
);

return defineConfig(
// == Typescript =============================================================
eslint.configs.recommended,
...tseslint.configs.recommended,
Expand Down Expand Up @@ -59,6 +65,6 @@ export function eslintConfig(userConfigs = []) {

...baseConfig,

...(Array.isArray(userConfigs) ? userConfigs : [userConfigs ?? {}])
...normalizedUserConfigs
);
}
4 changes: 2 additions & 2 deletions configs/eslint-config-custom/eslint.config.yaml.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @ts-check

import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
import yamlParser from "yaml-eslint-parser";
import eslintPluginYml from "eslint-plugin-yml";
import baseConfig from "./eslint.config.base.js";

export default tseslint.config(
export default defineConfig(
...baseConfig,

// == YAML ===================================================================
Expand Down
20 changes: 10 additions & 10 deletions configs/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
}
},
"devDependencies": {
"@eslint/js": "^9.28.0",
"@typescript-eslint/parser": "^8.33.1",
"eslint": "^9.28.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-prettier": "^5.4.1",
"eslint-plugin-yml": "^1.18.0",
"globals": "^16.2.0",
"prettier": "^3.5.3",
"@eslint/js": "^9.37.0",
"@typescript-eslint/parser": "^8.46.0",
"eslint": "^9.37.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-yml": "^1.19.0",
"globals": "^16.4.0",
"prettier": "^3.6.2",
"prettier-config-custom": "workspace:^",
"typescript": "^5.8.3",
"typescript-eslint": "^8.33.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.46.0",
"yaml-eslint-parser": "^1.3.0"
},
"prettier": "prettier-config-custom"
Expand Down
2 changes: 2 additions & 0 deletions configs/vite-config-custom/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { eslintConfig } from "eslint-config-custom/typescript";
export default eslintConfig();
13 changes: 0 additions & 13 deletions configs/vite-config-custom/index.d.ts

This file was deleted.

28 changes: 22 additions & 6 deletions configs/vite-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,34 @@
"version": "0.1.0",
"private": true,
"type": "module",
"typings": "index.d.ts",
"main": "index.js",
"typings": "./dist/index.d.ts",
"main": "./dist/index.js",
"prettier": "prettier-config-custom",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./package.json": "./package.json"
},
"scripts": {
"clean": "yarn g:clean",
"build": "yarn run -T tsc --build tsconfig.lib.json --emitDeclarationOnly false",
"lint": "yarn g:lint",
"fix": "yarn g:fix",
"check": "yarn g:check"
},
"devDependencies": {
"eslint-config-custom": "workspace:^",
"prettier-config-custom": "workspace:^",
"vite-config-builder": "^0.0.2",
"tsconfig-custom": "workspace:^",
"vite-config-builder": "^0.1.1",
"vite-plugin-dts-build": "^0.2.2",
"vite-plugin-externalize-deps": "^0.9.0",
"vite-plugin-externalize-deps": "^0.10.0",
"vite-tsconfig-paths": "^5.1.4"
},
"dependencies": {
"typescript": "^5.8.3",
"vite": "^6.3.5"
"typescript": "^5.9.3",
"vite": "^7.1.9"
}
}
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
// @ts-check

import { resolve, join } from "node:path";
import { cwd, env } from "node:process";

import { initConfigBuilder, ViteEnv, PluginBuilder } from "vite-config-builder";
import type { ConfigBuilder } from "vite-config-builder";
import { mergeConfig } from "vite";
import type { ConfigEnv } from "vite";
import type { defineConfig, ViteUserConfig } from "vitest/config";

import { externalizeDeps } from "vite-plugin-externalize-deps";
import tsconfigPaths from "vite-tsconfig-paths";
import { dtsForEsm, dtsForCjs } from "vite-plugin-dts-build";

// == Main Configs ============================================================
export function NodeConfig(viteConfigEnv, extendConfigs = {}) {
type TInputConfig = Parameters<typeof defineConfig>[0];
type TOutputConfig = ReturnType<typeof mergeConfig>;

export function NodeConfig(
viteConfigEnv: ConfigEnv,
extendConfigs: TInputConfig = {}
): TOutputConfig {
return buildConfig(viteConfigEnv, extendConfigs, NodeBuilder);
}

function buildConfig(viteConfigEnv, extendConfigs, configBuilder) {
function buildConfig(
viteConfigEnv: ConfigEnv,
extendConfigs: TInputConfig,
configBuilder: (viteConfigEnv: ConfigEnv) => ConfigBuilder
): TOutputConfig {
return mergeConfig(
{
...configBuilder(viteConfigEnv).build()
},
extendConfigs
extendConfigs as ViteUserConfig
);
}

// == Main Configs ============================================================
function NodeBuilder(viteConfigEnv) {
function NodeBuilder(viteConfigEnv: ConfigEnv) {
const { configs, plugins } = initCommonBuilder(viteConfigEnv);
const packageRoot = cwd();
const entryRoot = resolve(packageRoot, "src");
Expand Down Expand Up @@ -110,7 +121,7 @@ function NodeBuilder(viteConfigEnv) {
return configs;
}

function initCommonBuilder(viteConfigEnv) {
function initCommonBuilder(viteConfigEnv: ConfigEnv) {
const configs = initConfigBuilder(viteConfigEnv);

configs.add({
Expand Down
7 changes: 7 additions & 0 deletions configs/vite-config-custom/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.lib.json" }
]
}
Comment on lines +1 to +7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Make the referenced project composite (required for TS project references)

This tsconfig is referenced by multiple packages. TypeScript requires referenced projects to be composite. Add compilerOptions.composite: true (or update dependents to reference a composite child like tsconfig.lib.json).

Apply:

 {
-  "files": [],
-  "references": [
-    { "path": "./tsconfig.node.json" },
-    { "path": "./tsconfig.lib.json" }
-  ]
+  "files": [],
+  "compilerOptions": {
+    "composite": true
+  },
+  "references": [
+    { "path": "./tsconfig.node.json" },
+    { "path": "./tsconfig.lib.json" }
+  ]
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"files": [],
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.lib.json" }
]
}
{
"files": [],
"compilerOptions": {
"composite": true
},
"references": [
{ "path": "./tsconfig.node.json" },
{ "path": "./tsconfig.lib.json" }
]
}
🤖 Prompt for AI Agents
configs/vite-config-custom/tsconfig.json lines 1-7: the referenced projects must
be composite for TypeScript project references to work; add a compilerOptions
section with "composite": true to this tsconfig (or alternatively update
dependent configs to reference an already-composite child like
tsconfig.lib.json). Ensure the file includes "compilerOptions": { "composite":
true } at top-level so TypeScript can validate and build project references.

9 changes: 9 additions & 0 deletions configs/vite-config-custom/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "tsconfig-custom/tsconfig.base.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"tsBuildInfoFile": "./.cache/typescript/tsbuildinfo-esm"
},
"include": ["src"]
}
14 changes: 14 additions & 0 deletions configs/vite-config-custom/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "tsconfig-custom/tsconfig.node.json",
"compilerOptions": {
"tsBuildInfoFile": "./.cache/typescript/tsbuildinfo-node",
"outDir": "./.cache/tsbuild-node"
},
"include": [
"eslint.config.js"
],
"exclude": [
"dist",
"_release"
]
}
3 changes: 2 additions & 1 deletion examples/react-babel/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { defineConfig } from "eslint/config";
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(
export default defineConfig(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
Expand Down
42 changes: 21 additions & 21 deletions examples/react-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,43 @@
"preview": "vite preview"
},
"dependencies": {
"@babel/core": "^7.27.4",
"@babel/core": "^7.28.4",
"@babel/preset-typescript": "^7.27.1",
"@emotion/hash": "^0.9.2",
"@mincho-js/css": "workspace:^",
"@mincho-js/integration": "workspace:^",
"@mincho-js/react": "workspace:^",
"@mincho-js/vite": "workspace:^",
"@vanilla-extract/css": "^1.17.2",
"@vanilla-extract/css-utils": "^0.1.4",
"@vanilla-extract/private": "^1.0.7",
"css-what": "^6.1.0",
"@vanilla-extract/css": "^1.17.4",
"@vanilla-extract/css-utils": "^0.1.6",
"@vanilla-extract/private": "^1.0.9",
"css-what": "^7.0.0",
"cssesc": "^3.0.0",
"dedent": "^1.6.0",
"dedent": "^1.7.0",
"deep-object-diff": "^1.1.9",
"deepmerge": "^4.3.1",
"lru-cache": "^11.1.0",
"lru-cache": "^11.2.2",
"media-query-parser": "3.0.2",
"modern-ahocorasick": "^2.0.4",
"picocolors": "^1.1.1",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"scheduler": "^0.26.0"
"react": "^19.2.0",
"react-dom": "^19.2.0",
"scheduler": "^0.27.0"
},
"devDependencies": {
"@eslint/js": "^9.28.0",
"@eslint/js": "^9.37.0",
"@types/babel__core": "^7.20.5",
"@types/cssesc": "^3.0.2",
"@types/react": "^19.1.6",
"@types/react-dom": "^19.1.6",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.1",
"@types/scheduler": "^0.26.0",
"@vitejs/plugin-react": "^4.5.1",
"eslint": "^9.28.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.2.0",
"typescript": "~5.8.3",
"typescript-eslint": "^8.33.1",
"vite": "^6.3.5"
"@vitejs/plugin-react": "^5.0.4",
"eslint": "^9.37.0",
"eslint-plugin-react-hooks": "^6.1.1",
"eslint-plugin-react-refresh": "^0.4.23",
"globals": "^16.4.0",
"typescript": "~5.9.3",
"typescript-eslint": "^8.46.0",
"vite": "^7.1.9"
Comment on lines +38 to +51
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

🧩 Analysis chain

Verify major version bumps in dev tooling.

Several significant version updates were made:

  • Vite: ^6.3.5 → ^7.1.9 (major version bump)
  • ESLint: ^9.28.0 → ^9.37.0 (9 minor versions)
  • TypeScript: ~5.8.3 → ~5.9.3

Ensure the Vite 7.x migration is documented and tested, as major version bumps typically include breaking changes. Verify that ESLint rule changes don't introduce new violations.

Run the following script to check for breaking changes:

Additionally, please search the web for Vite 7.x migration guide:


🏁 Script executed:

#!/bin/bash
# Description: Check for breaking changes and changelogs

echo "=== Vite 7.x changelog ==="
npm view vite@7.1.9 --json | jq '{version, description}'

echo "=== ESLint 9.37.0 features ==="
npm view eslint@9.37.0 --json | jq '{version, description}'

echo "=== TypeScript 5.9.3 release notes ==="
npm view typescript@5.9.3 --json | jq '{version}'

Length of output: 295


🌐 Web query:

What are the breaking changes in Vite 7.0 and how to migrate from Vite 6.x?

💡 Result:

Short summary of breaking changes in Vite 7 and how to migrate from Vite 6.x.

Breaking changes (high‑impact items)

  • Node requirement: Node 20.19+ or 22.12+ (Node 18 dropped). [1]
  • Vite is ESM‑only (no CJS build). [2]
  • Default build target changed from "modules" to "baseline-widely-available" (minimum browser targets bumped: Chrome → 107, Edge → 107, Firefox → 104, Safari → 16.0). You may need to adjust build.target if you support older browsers. [1][2]
  • Sass: legacy Sass API support removed — Vite always uses the modern Sass compiler API. Update any code/config that relied on the legacy API. [3]
  • Removed splitVendorChunkPlugin (and other deprecated plugins/APIs like HotBroadcaster, deprecated hook-level enforce/transform in transformIndexHtml). [3]
  • Removed some experimental SSR/transforms/options (e.g., experimental.skipSsrTransform) and other low‑level API removals — check plugins/framework integrations for compatibility. [3]
  • Vitest: Vite 7 requires newer Vitest (Vitest 3.2+ for full support of testing environments). [1]

Minimal migration checklist (recommended)

  1. Upgrade Node on your dev/CI machines to 20.19+ or 22.12+. Test CI images. [1]
  2. Update dependency: npm/yarn pnpm upgrade vite@^7.0.0.
  3. Adjust build.target if you need older browser support (explicitly set build.target to your desired target). Test production builds and browsers. [1][2]
  4. Remove/replace splitVendorChunkPlugin usage (it was removed). [3]
  5. Update any Sass usage/config to the modern Sass API; remove any legacy Sass options. [3]
  6. Update plugins and framework integrations to versions compatible with Vite 7 (look for plugin releases that state Vite 7 support). Fix code that uses removed experimental/internal APIs (search for errors about removed hooks/options). [3]
  7. Upgrade Vitest to 3.2+ if you use Vitest. Run tests. [1]
  8. Run a full dev + build + SSR (if applicable) smoke test and fix plugin/API breakages reported by Vite. Consult plugin author notes for changes to Environment API or SSR integration. [1][2]
  9. Read Vite 7 changelog/migration guide and your project’s CI/build logs for any further deprecations/errors and follow their suggested fixes. [1][2]

Key references

  • Vite 7 announcement (release notes + migration summary). [1]
  • Vite Breaking Changes / Changes page (list of removals & planned items). [2]
  • Vite 7 changelog / PR summary with removed items (splitVendorChunkPlugin, Sass legacy removal, Node bump, etc.). [3]

If you want, I can:

  • scan your package.json / vite.config.* and list exact changes needed for your project, or
  • produce a one‑click migration script (Node + dependency updates + common replacements). Which would you prefer?

Address Vite v7 migration and ESLint/TS updates.

  • Upgrade Node in CI/dev to ≥20.19.
  • Convert to ESM-only config (remove CJS usage).
  • Set build.target explicitly if you support older browsers (default now “baseline-widely-available”).
  • Remove splitVendorChunkPlugin and other deprecated Vite 6 APIs in your vite.config.*.
  • Update Sass configuration to use the modern Sass compiler API.
  • Upgrade Vitest to ≥3.2 if you run tests under Vite.
  • Run full dev, build, and SSR (if used) smoke tests; fix any plugin/API breakages.
  • Run ESLint 9.37.0 and address any new lint violations.
  • Confirm TypeScript 5.9.3 introduces no type errors.
🤖 Prompt for AI Agents
In examples/react-babel/package.json around lines 38 to 51: update project and
tooling to Vite v7 and related ESLint/TypeScript requirements by ensuring CI/dev
Node is >=20.19, converting any Vite config files to ESM-only (remove CommonJS
usage), explicitly set build.target in vite.config to the desired browser
baseline, remove deprecated Vite 6 APIs such as splitVendorChunkPlugin and
replace with supported alternatives, update Sass configuration to use the modern
Dart Sass compiler API, upgrade Vitest to >=3.2 if tests run under Vite, run
full dev/build/SSR smoke tests and fix plugin/API breakages, run ESLint 9.37.0
and resolve reported lint issues, and validate TypeScript 5.9.3 produces no type
errors before committing.

}
}
Loading
Loading