Skip to content

Commit c58004f

Browse files
feat(deps): upgrade upstream dependencies
1 parent 4b8460f commit c58004f

18 files changed

Lines changed: 810 additions & 233 deletions

packages/cli/src/create/discovery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export function inferParentDir(
221221
workspaceInfo: WorkspaceInfoOptional,
222222
): string | undefined {
223223
if (workspaceInfo.parentDirs.length === 0) {
224-
return;
224+
return undefined;
225225
}
226226
// apps/applications by default
227227
let rule = /app/i;
@@ -237,5 +237,5 @@ export function inferParentDir(
237237
return parentDir;
238238
}
239239
}
240-
return;
240+
return undefined;
241241
}

packages/cli/src/create/prompts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export async function promptPackageNameAndTargetDir(
2222
defaultValue: defaultPackageName,
2323
validate: (value) => {
2424
if (value == null || value.length === 0) {
25-
return;
25+
return undefined;
2626
}
2727
const result = value ? validateNpmPackageName(value) : null;
2828
if (result?.validForNewPackages) {
29-
return;
29+
return undefined;
3030
}
3131
return result?.errors?.[0] ?? result?.warnings?.[0] ?? 'Invalid package name';
3232
},

packages/cli/src/migration/bin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ async function confirmEslintMigration(interactive: boolean): Promise<boolean> {
8686
if (prompts.isCancel(confirmed)) {
8787
cancelAndExit();
8888
}
89-
return !!confirmed;
89+
return confirmed;
9090
}
9191
return true;
9292
}
@@ -145,7 +145,7 @@ async function confirmPrettierMigration(interactive: boolean): Promise<boolean>
145145
if (prompts.isCancel(confirmed)) {
146146
cancelAndExit();
147147
}
148-
return !!confirmed;
148+
return confirmed;
149149
}
150150
prompts.log.info('Prettier configuration detected. Auto-migrating to Oxfmt...');
151151
return true;
@@ -199,7 +199,7 @@ async function confirmNodeVersionFileMigration(
199199
if (prompts.isCancel(confirmed)) {
200200
cancelAndExit();
201201
}
202-
return !!confirmed;
202+
return confirmed;
203203
}
204204
return true;
205205
}

packages/cli/src/migration/migrator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,16 +1917,16 @@ export function installGitHooks(
19171917
export function getOldHooksDir(rootDir: string): string | undefined {
19181918
const packageJsonPath = path.join(rootDir, 'package.json');
19191919
if (!fs.existsSync(packageJsonPath)) {
1920-
return;
1920+
return undefined;
19211921
}
19221922
const pkg = readJsonFile<{ scripts?: { prepare?: string } }>(packageJsonPath);
19231923
if (!pkg.scripts?.prepare) {
1924-
return;
1924+
return undefined;
19251925
}
19261926
const prepare = collapseHuskyInstall(pkg.scripts.prepare);
19271927
const match = prepare.match(/\bhusky(?:\s+([\w./-]+))?/);
19281928
if (!match) {
1929-
return;
1929+
return undefined;
19301930
}
19311931
return match[1] ?? '.husky';
19321932
}
@@ -2231,7 +2231,7 @@ export function createPreCommitHook(projectPath: string, dir = '.vite-hooks'): v
22312231
export function rewritePrepareScript(rootDir: string): string | undefined {
22322232
const packageJsonPath = path.join(rootDir, 'package.json');
22332233
if (!fs.existsSync(packageJsonPath)) {
2234-
return;
2234+
return undefined;
22352235
}
22362236

22372237
let oldDir: string | undefined;

packages/cli/src/utils/__tests__/agent.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ beforeEach(async () => {
235235
await mockFs.unlink(filePath);
236236
});
237237
vi.spyOn(fsPromises, 'writeFile').mockImplementation(async (filePath, data) => {
238-
await mockFs.writeFile(filePath as fs.PathLike, String(data as string));
238+
await mockFs.writeFile(filePath as fs.PathLike, data as string);
239239
});
240240

241241
await mockFs.writeFile(path.join(pkgRoot, 'AGENTS.md'), AGENT_TEMPLATE);

packages/cli/tsdown.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const fixVersionsPathPlugin = {
1414
if (source === '../versions.js') {
1515
return { id: './versions.js', external: true };
1616
}
17+
return undefined;
1718
},
1819
};
1920

packages/core/build-support/find-create-require.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ function findCreateRequireInStaticImports(
142142
return value === 'node:module' || value === 'module';
143143
});
144144
if (!importFromModule) {
145-
return;
145+
return undefined;
146146
}
147147

148148
// Find the createRequire import entry
149149
const createRequireEntry = importFromModule.entries.find((entry) => {
150150
return entry.importName.name === 'createRequire';
151151
});
152152
if (!createRequireEntry) {
153-
return;
153+
return undefined;
154154
}
155155

156156
const createRequireLocalName = createRequireEntry.localName.value;
@@ -175,7 +175,7 @@ function findCreateRequireInStaticImports(
175175
varVisitor.visit(ast.program);
176176

177177
if (!requireVarName) {
178-
return;
178+
return undefined;
179179
}
180180

181181
// Find all calls to the require variable
@@ -277,7 +277,7 @@ function findCreateRequireInGlobalModule(
277277
visitor.visit(ast.program);
278278

279279
if (!requireVarName) {
280-
return;
280+
return undefined;
281281
}
282282

283283
// Find all calls to the require variable

packages/core/build-support/rewrite-imports.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const RewriteImportsPlugin: Plugin = {
1919
external: true,
2020
};
2121
}
22+
return undefined;
2223
},
2324
},
2425
};

packages/core/build.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ async function buildVite() {
153153
};
154154
}
155155
}
156+
return undefined;
156157
},
157158
},
158159
{
@@ -194,19 +195,20 @@ async function buildVite() {
194195
};
195196
}
196197
}
198+
return undefined;
197199
},
198200
},
199201
{
200202
name: 'suppress-vite-version-only-reporter-line',
201203
transform(code, id) {
202204
if (!id.endsWith(join('vite', 'src', 'node', 'plugins', 'reporter.ts'))) {
203-
return;
205+
return undefined;
204206
}
205207

206208
// Upstream native reporter can emit a redundant standalone "vite vX.Y.Z" line.
207209
// Filter it at source so snapshots and CLI output remain stable.
208210
if (code.includes('VITE_VERSION_ONLY_LINE_RE')) {
209-
return;
211+
return undefined;
210212
}
211213

212214
const constLine =
@@ -215,7 +217,7 @@ async function buildVite() {
215217
' logInfo: shouldLogInfo ? (msg) => env.logger.info(msg) : undefined,';
216218

217219
if (!code.includes(constLine) || !code.includes(logInfoLine)) {
218-
return;
220+
return undefined;
219221
}
220222

221223
return {
@@ -404,6 +406,7 @@ async function bundleTsdown() {
404406
}
405407
return { code: updatedCode };
406408
}
409+
return undefined;
407410
},
408411
},
409412
],

packages/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"@tsdown/exe": "0.21.7",
141141
"@types/node": "^20.19.0 || >=22.12.0",
142142
"@vitejs/devtools": "^0.1.0",
143-
"esbuild": "^0.28.0",
143+
"esbuild": "^0.27.0 || ^0.28.0",
144144
"jiti": ">=1.21.0",
145145
"less": "^4.0.0",
146146
"publint": "^0.3.0",
@@ -217,7 +217,7 @@
217217
"node": "^20.19.0 || >=22.12.0"
218218
},
219219
"bundledVersions": {
220-
"vite": "8.0.5",
220+
"vite": "8.0.6",
221221
"rolldown": "1.0.0-rc.13",
222222
"tsdown": "0.21.7"
223223
}

0 commit comments

Comments
 (0)