GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Skip code generation in CI (#65004) · microsoft/TypeScript@c19df28

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Herebyfile.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Herebyfile.mjs‎

Copy file name to clipboardExpand all lines: Herebyfile.mjs
+12-7Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ const { values: rawOptions } = parseArgs({
103103
tests: { type: "string", short: "t" },
104104
fix: { type: "boolean" },
105105
force: { type: "boolean", default: parseEnvBoolean("FORCE") },
106+
generate: { type: "boolean", default: !isCI },
106107
api: { type: "boolean" },
107108
all: { type: "boolean" },
108109
debug: { type: "boolean" },
@@ -797,10 +798,12 @@ export const generate = task({
797798
run: runGenerate,
798799
});
799800

801+
const generateDependencies = options.generate ? [generate] : [];
802+
800803
export const tscBuild = task({
801804
name: "tsc:build",
802-
description: "Generates sources and builds the tsc binary.",
803-
dependencies: [generate],
805+
description: "Builds the tsc binary, generating sources by default outside CI. Pass --generate or --no-generate to override.",
806+
dependencies: generateDependencies,
804807
run: async () => {
805808
await buildTsc({ extraFlags: options.release ? getReleaseBuildFlags() : [] });
806809
},
@@ -838,7 +841,9 @@ export const buildWatch = task({
838841
await watchDebounced("build:watch", async (_paths, abortSignal) => {
839842
abortSignal.throwIfAborted();
840843
invalidateFileFingerprints();
841-
await runGenerate();
844+
if (options.generate) {
845+
await runGenerate();
846+
}
842847
abortSignal.throwIfAborted();
843848
await generateLibs(builtLocal);
844849
abortSignal.throwIfAborted();
@@ -1167,7 +1172,7 @@ export const testCodegen = task({
11671172
export const buildAPI = task({
11681173
name: "build:api",
11691174
description: "Builds @typescript/typescript JS API.",
1170-
dependencies: [generate],
1175+
dependencies: generateDependencies,
11711176
run: async () => {
11721177
await run("npm", ["run", "-w", "@typescript/typescript", "build"]);
11731178
},
@@ -1275,7 +1280,7 @@ export const buildWasi = task({
12751280
export const buildAPITests = task({
12761281
name: "build:api:test",
12771282
description: "Builds the @typescript/typescript JS API tests.",
1278-
dependencies: [generate, lib],
1283+
dependencies: [...generateDependencies, lib],
12791284
run: runBuildAPITests,
12801285
});
12811286

@@ -2579,7 +2584,7 @@ function stripConditionsFromValue(value) {
25792584
export const buildTypeScriptPackages = task({
25802585
name: "typescript:build",
25812586
description: "Builds TypeScript npm packages for the current platform. Pass --respectGoEnv to preserve caller-provided Go build settings.",
2582-
dependencies: usePublishedPlatformPackagesForVsix ? undefined : [generate],
2587+
dependencies: usePublishedPlatformPackagesForVsix ? undefined : generateDependencies,
25832588
run: runBuildTypeScriptPackages,
25842589
});
25852590

@@ -3546,7 +3551,7 @@ export const vscodeTypescriptRelease = task({
35463551
export const typeScriptRelease = task({
35473552
name: "typescript:release",
35483553
hiddenFromTaskList: true,
3549-
dependencies: [generate],
3554+
dependencies: generateDependencies,
35503555
run: async () => {
35513556
if (releaseVscodeTypescript) {
35523557
throw new Error("typescript:release cannot be used with --vscodeTypescriptRelease; use vscode-typescript:release");

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.