Skip to content

Commit 1bc8637

Browse files
feat(deps): upgrade upstream dependencies (#2000)
## Summary - Automated daily upgrade of upstream dependencies. - Bumps `vite` to `v8.1.2` (source hash `63b1489` -> `ba31193`) and propagates it to the bundled version in `packages/core/package.json`. - Bumps `oxlint-tsgolint` `0.23.0` -> `0.24.0`. - Removes now-redundant TypeScript type assertions flagged across several source files. ## Dependency updates | Package | From | To | | --- | --- | --- | | `vite` | `63b1489` | `v8.1.2 (ba31193)` | | `oxlint-tsgolint` | `0.23.0` | `0.24.0` | <details><summary>Unchanged dependencies</summary> - `rolldown`: `v1.1.3 (e77f7c7)` - `vitest`: `4.1.9` - `@vitest/browser`: `4.1.9` - `@vitest/browser-playwright`: `4.1.9` - `@vitest/browser-preview`: `4.1.9` - `@vitest/browser-webdriverio`: `4.1.9` - `@vitest/expect`: `4.1.9` - `@vitest/mocker`: `4.1.9` - `@vitest/pretty-format`: `4.1.9` - `@vitest/runner`: `4.1.9` - `@vitest/snapshot`: `4.1.9` - `@vitest/spy`: `4.1.9` - `@vitest/utils`: `4.1.9` - `tsdown`: `0.22.3` - `@tsdown/css`: `0.22.3` - `@tsdown/exe`: `0.22.3` - `lightningcss`: `^1.32.0` - `@oxc-node/cli`: `0.1.0` - `@oxc-node/core`: `0.1.0` - `oxfmt`: `0.57.0` - `oxlint`: `1.72.0` - `@oxc-project/runtime`: `0.138.0` - `@oxc-project/types`: `0.138.0` - `oxc-minify`: `0.138.0` - `oxc-parser`: `0.138.0` - `oxc-transform`: `0.138.0` - `VITEST_VERSION constant`: `4.1.9` - `test-vp-create workflow`: `4.1.9` - `README vitest pins`: `4.1.9` - `@vitejs/devtools`: `0.3.3` </details> ## Code changes - Bumped the bundled `vite` version `8.1.0` -> `8.1.2` in `packages/core/package.json`. - Removed now-redundant TypeScript type assertions in `docs/.vitepress/theme/data/fetch-trusted-stack-stats.ts`, `packages/cli/build.ts`, `packages/cli/src/__tests__/define-config-plugins.spec.ts`, `packages/cli/src/define-config.ts`, `packages/cli/src/migration/migrator.ts`, `packages/cli/src/utils/approve-builds.ts`, and `packages/tools/src/sync-remote-deps.ts`. - Regenerated `pnpm-lock.yaml` and updated the upstream hash in `packages/tools/.upstream-versions.json`. ## Build status - `sync-remote-and-build`: success - `build-upstream`: failure Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com>
1 parent 2de8164 commit 1bc8637

11 files changed

Lines changed: 328 additions & 418 deletions

File tree

docs/.vitepress/theme/data/fetch-trusted-stack-stats.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function parseNpmDownloadsJson(data: unknown, pkg: string): number {
5050
if (typeof data !== 'object' || data === null || !('downloads' in data)) {
5151
throw new Error(`npm API ${pkg}: unexpected payload`);
5252
}
53-
const downloads = (data as { downloads: unknown }).downloads;
53+
const downloads = data.downloads;
5454
if (typeof downloads !== 'number') {
5555
throw new Error(`npm API ${pkg}: unexpected payload`);
5656
}
@@ -71,7 +71,7 @@ function parseGithubRepoJson(data: unknown, repo: string): number {
7171
if (typeof data !== 'object' || data === null || !('stargazers_count' in data)) {
7272
throw new Error(`GitHub API ${repo}: unexpected payload`);
7373
}
74-
const count = (data as { stargazers_count: unknown }).stargazers_count;
74+
const count = data.stargazers_count;
7575
if (typeof count !== 'number') {
7676
throw new Error(`GitHub API ${repo}: unexpected payload`);
7777
}

packages/cli/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ async function createConditionalShim(
10981098
entries.push(['default', `./dist/test/${shimBaseName}.js`]);
10991099
}
11001100

1101-
return Object.fromEntries(entries) as ExportValue;
1101+
return Object.fromEntries(entries);
11021102
}
11031103

11041104
/**

packages/cli/src/__tests__/define-config-plugins.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ const RESOLVER_PLUGIN_NAME = 'vite-plus:vitest-resolver';
1515
const COVERAGE_GUARD_PLUGIN_NAME = 'vite-plus:coverage-version-guard';
1616

1717
function pluginName(p: unknown): string | undefined {
18-
if (
19-
p &&
20-
typeof p === 'object' &&
21-
'name' in p &&
22-
typeof (p as { name: unknown }).name === 'string'
23-
) {
18+
if (p && typeof p === 'object' && 'name' in p && typeof p.name === 'string') {
2419
return (p as { name: string }).name;
2520
}
2621
return undefined;

packages/cli/src/define-config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ function injectPluginIntoInlineConfig<
614614
vitePlusCoverageVersionGuardPlugin(),
615615
...(config.plugins ?? []),
616616
],
617-
} as T;
617+
};
618618
}
619619

620620
/**
@@ -710,12 +710,12 @@ export function defineConfig(config: ViteUserConfigExport): ViteUserConfigExport
710710
*/
711711
function injectPluginIntoProjectExport(config: UserProjectConfigExport): UserProjectConfigExport {
712712
if (typeof config === 'function') {
713-
return ((env: ConfigEnv) => {
713+
return (env: ConfigEnv) => {
714714
const result = config(env);
715715
return result instanceof Promise
716716
? result.then(injectPluginIntoInlineConfig)
717717
: injectPluginIntoInlineConfig(result);
718-
}) as UserProjectConfigFn;
718+
};
719719
}
720720
if (config instanceof Promise) {
721721
return config.then(injectPluginIntoInlineConfig);

packages/cli/src/migration/migrator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ function pruneLegacyWrapperAliases(record: Record<string, unknown> | undefined):
556556
if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
557557
if (pruneLegacyWrapperAliases(value as Record<string, unknown>)) {
558558
mutated = true;
559-
if (Object.keys(value as Record<string, unknown>).length === 0) {
559+
if (Object.keys(value).length === 0) {
560560
delete record[key];
561561
}
562562
}
@@ -830,7 +830,7 @@ function collectJsPluginPackageNames(projectPath: string): Set<string> {
830830
}
831831
let config: OxlintConfig;
832832
try {
833-
config = readJsonFile(oxlintConfigPath, true) as OxlintConfig;
833+
config = readJsonFile(oxlintConfigPath, true);
834834
} catch {
835835
return out;
836836
}
@@ -2129,7 +2129,7 @@ function readPackageJsonIfExists(packageJsonPath: string): DependencyBag | undef
21292129
return undefined;
21302130
}
21312131
try {
2132-
return readJsonFile(packageJsonPath) as DependencyBag;
2132+
return readJsonFile(packageJsonPath);
21332133
} catch {
21342134
return undefined;
21352135
}
@@ -5680,7 +5680,7 @@ export function detectIncompatibleEslintIntegration(
56805680
}
56815681
let pkg: { devDependencies?: Record<string, string>; dependencies?: Record<string, string> };
56825682
try {
5683-
pkg = readJsonFile(pkgJsonPath) as typeof pkg;
5683+
pkg = readJsonFile(pkgJsonPath);
56845684
} catch {
56855685
continue;
56865686
}

packages/cli/src/utils/approve-builds.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export function addYarnBuiltDependenciesMeta(
406406
for (const name of packages) {
407407
const current = meta[name];
408408
meta[name] = {
409-
...(current && typeof current === 'object' ? (current as Record<string, unknown>) : {}),
409+
...(current && typeof current === 'object' ? current : {}),
410410
built: true,
411411
};
412412
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
"node": "^20.19.0 || ^22.18.0 || >=24.11.0"
213213
},
214214
"bundledVersions": {
215-
"vite": "8.1.0",
215+
"vite": "8.1.2",
216216
"rolldown": "1.1.3",
217217
"tsdown": "0.22.3"
218218
}

packages/tools/.upstream-versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"vite": {
88
"repo": "https://github.com/vitejs/vite.git",
99
"branch": "main",
10-
"hash": "63b14898598fc242ac2d3dd37dafeb39c864befa"
10+
"hash": "ba3119397d0110952f29965774c627a3017d7292"
1111
}
1212
}

packages/tools/src/sync-remote-deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ export function mergeWorkspaceYaml(
740740
return yaml.stringify(merged, stringifyOptions);
741741
}
742742

743-
reconcileMap(mainDoc.contents, merged as Record<string, unknown>, yaml);
743+
reconcileMap(mainDoc.contents, merged, yaml);
744744

745745
return mainDoc.toString(stringifyOptions);
746746
}

0 commit comments

Comments
 (0)