From 5672cb5cb7c3dcca53462527ad019a204dbb635b Mon Sep 17 00:00:00 2001 From: Andy Jessop Date: Thu, 5 Dec 2024 08:51:29 +0100 Subject: [PATCH] chore: remove experimentalVersions, --x-versions, --experimental-versions, --experimental-gradual-rollouts (and all their opposites) Remove flags from tests --- packages/wrangler/e2e/versions.test.ts | 46 ++--- .../src/__tests__/deployments.test.ts | 36 ++-- .../wrangler/src/__tests__/rollback.test.ts | 6 +- .../deployments/deployments.list.test.ts | 16 +- .../deployments/deployments.status.test.ts | 20 +- .../deployments/deployments.view.test.ts | 4 +- .../__tests__/versions/secrets/bulk.test.ts | 14 +- .../__tests__/versions/secrets/delete.test.ts | 10 +- .../__tests__/versions/secrets/list.test.ts | 8 +- .../__tests__/versions/secrets/put.test.ts | 19 +- .../versions/versions.deploy.test.ts | 42 ++--- .../__tests__/versions/versions.help.test.ts | 174 +----------------- .../__tests__/versions/versions.list.test.ts | 18 +- .../versions/versions.upload.test.ts | 6 +- .../__tests__/versions/versions.view.test.ts | 36 ++-- packages/wrangler/src/api/dev.ts | 1 - packages/wrangler/src/deploy/deploy.ts | 3 - packages/wrangler/src/deploy/index.ts | 1 - packages/wrangler/src/deprecated/index.ts | 1 - packages/wrangler/src/generate/index.ts | 1 - packages/wrangler/src/index.ts | 7 - packages/wrangler/src/triggers/deploy.ts | 6 +- packages/wrangler/src/triggers/index.ts | 1 - packages/wrangler/src/versions/deploy.ts | 2 +- packages/wrangler/src/versions/list.ts | 2 +- packages/wrangler/src/versions/upload.ts | 2 +- packages/wrangler/src/versions/view.ts | 2 +- packages/wrangler/src/yargs-types.ts | 1 - 28 files changed, 121 insertions(+), 364 deletions(-) diff --git a/packages/wrangler/e2e/versions.test.ts b/packages/wrangler/e2e/versions.test.ts index 7f7ace7c6632..f8515954dedf 100644 --- a/packages/wrangler/e2e/versions.test.ts +++ b/packages/wrangler/e2e/versions.test.ts @@ -56,7 +56,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { it("should upload 1st Worker version", async () => { const upload = await helper.run( - `wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload" --x-versions` + `wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload"` ); versionId1 = matchVersionId(upload.stdout); @@ -74,7 +74,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { }); it("should list 1 version", async () => { - const list = await helper.run(`wrangler versions list --x-versions`); + const list = await helper.run(`wrangler versions list`); expect(normalize(list.stdout)).toMatchInlineSnapshot(` "Version ID: 00000000-0000-0000-0000-000000000000 @@ -97,7 +97,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { it("should deploy 1st Worker version", async () => { const deploy = await helper.run( - `wrangler versions deploy ${versionId1}@100% --message "Deploy via e2e test" --yes --x-versions` + `wrangler versions deploy ${versionId1}@100% --message "Deploy via e2e test" --yes` ); expect(normalize(deploy.stdout)).toMatchInlineSnapshot(` @@ -137,7 +137,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { }); it("should list 1 deployment", async () => { - const list = await helper.run(`wrangler deployments list --x-versions`); + const list = await helper.run(`wrangler deployments list`); expect(normalize(list.stdout)).toMatchInlineSnapshot(` "Created: TIMESTAMP @@ -172,7 +172,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { }); const upload = await helper.run( - `wrangler versions upload --message "Upload AGAIN via e2e test" --tag "e2e-upload-AGAIN" --x-versions` + `wrangler versions upload --message "Upload AGAIN via e2e test" --tag "e2e-upload-AGAIN"` ); versionId2 = matchVersionId(upload.stdout); @@ -188,9 +188,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { Changes to triggers (routes, custom domains, cron schedules, etc) must be applied with the command wrangler triggers deploy" `); - const versionsList = await helper.run( - `wrangler versions list --x-versions` - ); + const versionsList = await helper.run(`wrangler versions list`); expect(normalize(versionsList.stdout)).toMatchInlineSnapshot(` "Version ID: 00000000-0000-0000-0000-000000000000 @@ -219,12 +217,10 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { it("should deploy 2nd Worker version", async () => { const deploy = await helper.run( - `wrangler versions deploy ${versionId2}@100% --message "Deploy AGAIN via e2e test" --yes --x-versions` + `wrangler versions deploy ${versionId2}@100% --message "Deploy AGAIN via e2e test" --yes` ); - const deploymentsList = await helper.run( - `wrangler deployments list --x-versions` - ); + const deploymentsList = await helper.run(`wrangler deployments list`); expect(normalize(deploy.stdout)).toMatchInlineSnapshot(` "╭ Deploy Worker Versions by splitting traffic between multiple versions @@ -296,16 +292,12 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { it("should rollback to implicit Worker version (1st version)", async () => { const rollback = await helper.run( - `wrangler rollback --message "Rollback via e2e test" --yes --x-versions` + `wrangler rollback --message "Rollback via e2e test" --yes` ); - const versionsList = await helper.run( - `wrangler versions list --x-versions` - ); + const versionsList = await helper.run(`wrangler versions list`); - const deploymentsList = await helper.run( - `wrangler deployments list --x-versions` - ); + const deploymentsList = await helper.run(`wrangler deployments list`); expect(normalize(rollback.stdout)).toMatchInlineSnapshot(` "├ Fetching latest deployment @@ -410,16 +402,12 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { it("should rollback to specific Worker version (0th version)", async () => { const rollback = await helper.run( - `wrangler rollback ${versionId0} --message "Rollback to old version" --yes --x-versions` + `wrangler rollback ${versionId0} --message "Rollback to old version" --yes` ); - const versionsList = await helper.run( - `wrangler versions list --x-versions` - ); + const versionsList = await helper.run(`wrangler versions list`); - const deploymentsList = await helper.run( - `wrangler deployments list --x-versions` - ); + const deploymentsList = await helper.run(`wrangler deployments list`); expect(normalize(rollback.stdout)).toMatchInlineSnapshot(` "├ Fetching latest deployment @@ -551,7 +539,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { }); const upload = await helper.run( - `wrangler versions upload --legacy-assets='./public' --x-versions` + `wrangler versions upload --legacy-assets='./public'` ); expect(normalize(upload.output)).toMatchInlineSnapshot(` @@ -587,7 +575,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { `, }); - const upload = await helper.run(`wrangler versions upload --x-versions`); + const upload = await helper.run(`wrangler versions upload`); expect(normalize(upload.output)).toMatchInlineSnapshot(` "▲ [WARNING] 🚧 \`wrangler versions upload\` is an open-beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose @@ -616,7 +604,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => { }); const upload = await helper.run( - `wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload-assets" --x-versions` + `wrangler versions upload --message "Upload via e2e test" --tag "e2e-upload-assets"` ); expect(normalize(upload.stdout)).toMatchInlineSnapshot(` diff --git a/packages/wrangler/src/__tests__/deployments.test.ts b/packages/wrangler/src/__tests__/deployments.test.ts index 1eaebd6cd189..a5b7edfa6f94 100644 --- a/packages/wrangler/src/__tests__/deployments.test.ts +++ b/packages/wrangler/src/__tests__/deployments.test.ts @@ -78,7 +78,7 @@ describe("deployments", () => { it("should log deployments", async () => { writeWranglerConfig(); - await runWrangler("deployments list --no-x-versions"); + await runWrangler("deployments list"); expect(std.out).toMatchInlineSnapshot(` " Version ID: Constitution-Class-tag:test-name @@ -108,9 +108,7 @@ describe("deployments", () => { }); it("should log deployments for script with passed in name option", async () => { - await runWrangler( - "deployments list --name something-else --no-x-versions" - ); + await runWrangler("deployments list --name something-else"); expect(std.out).toMatchInlineSnapshot(` " Version ID: Constitution-Class-tag:something-else @@ -141,7 +139,7 @@ describe("deployments", () => { it("should error on missing script name", async () => { await expect( - runWrangler("deployments list --no-x-versions") + runWrangler("deployments list") ).rejects.toMatchInlineSnapshot( `[Error: Required Worker name missing. Please specify the Worker name in your Wrangler configuration file, or pass it as an argument with \`--name\`]` ); @@ -149,7 +147,7 @@ describe("deployments", () => { }); describe("deployment view", () => { - it("should error with no --no-x-versions flag", async () => { + it("should error with no flag", async () => { writeWranglerConfig(); await expect( @@ -162,7 +160,7 @@ describe("deployments", () => { it("should log deployment details", async () => { writeWranglerConfig(); - await runWrangler("deployments view 1701-E --no-x-versions"); + await runWrangler("deployments view 1701-E"); expect(std.out).toMatchInlineSnapshot(` " @@ -183,7 +181,7 @@ describe("deployments", () => { it("should log deployment details with bindings", async () => { writeWranglerConfig(); - await runWrangler("deployments view bindings-tag --no-x-versions"); + await runWrangler("deployments view bindings-tag"); expect(std.out).toMatchInlineSnapshot(` " @@ -207,7 +205,7 @@ describe("deployments", () => { it("should automatically log latest deployment details", async () => { writeWranglerConfig(); - await runWrangler("deployments view --no-x-versions"); + await runWrangler("deployments view"); expect(std.out).toMatchInlineSnapshot(` " @@ -284,9 +282,7 @@ describe("deployments", () => { }); writeWranglerConfig(); - await runWrangler( - "rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --no-x-versions" - ); + await runWrangler("rollback 3mEgaU1T-Intrepid-someThing-tag:test-name"); expect(std.out).toMatchInlineSnapshot(` " Successfully rolled back to Deployment ID: 3mEgaU1T-Intrepid-someThing-tag:test-name @@ -303,9 +299,7 @@ describe("deployments", () => { }); writeWranglerConfig(); - await runWrangler( - "rollback 3mEgaU1T-Intrpid-someThing-tag:test-name --no-x-versions" - ); + await runWrangler("rollback 3mEgaU1T-Intrpid-someThing-tag:test-name"); expect(std.out).toMatchInlineSnapshot(`""`); expect(requests.count).toEqual(0); @@ -315,9 +309,7 @@ describe("deployments", () => { setIsTTY(false); writeWranglerConfig(); - await runWrangler( - "rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --no-x-versions" - ); + await runWrangler("rollback 3mEgaU1T-Intrepid-someThing-tag:test-name"); expect(std.out).toMatchInlineSnapshot(` "? This deployment 3mEgaU1T will immediately replace the current deployment and become the active deployment across all your deployed routes and domains. However, your local development environment will not be affected by this rollback. Note: Rolling back to a previous deployment will not rollback any of the bound resources (Durable Object, D1, R2, KV, etc). 🤖 Using fallback value in non-interactive context: yes @@ -334,7 +326,7 @@ describe("deployments", () => { it("should skip prompt automatically in rollback if message flag is provided", async () => { writeWranglerConfig(); await runWrangler( - `rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test" --no-x-versions` + `rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test"` ); expect(std.out).toMatchInlineSnapshot(` " @@ -348,7 +340,7 @@ describe("deployments", () => { it("should skip prompt automatically in rollback with empty message", async () => { writeWranglerConfig(); await runWrangler( - `rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test" --no-x-versions` + `rollback 3mEgaU1T-Intrepid-someThing-tag:test-name --message "test"` ); expect(std.out).toMatchInlineSnapshot(` " @@ -371,7 +363,7 @@ describe("deployments", () => { }); writeWranglerConfig(); - await runWrangler("rollback --no-x-versions"); + await runWrangler("rollback"); expect(std.out).toMatchInlineSnapshot(` " Successfully rolled back to Deployment ID: 3mEgaU1T-Intrepid-someThing-tag:test-name @@ -400,7 +392,7 @@ describe("deployments", () => { result: "", }); - await runWrangler("rollback --name something-else --no-x-versions"); + await runWrangler("rollback --name something-else"); expect(std.out).toMatchInlineSnapshot(` " Successfully rolled back to Deployment ID: 3mEgaU1T-Intrepid-someThing-tag:something-else diff --git a/packages/wrangler/src/__tests__/rollback.test.ts b/packages/wrangler/src/__tests__/rollback.test.ts index f3702c098770..3ceed3f5c8e6 100644 --- a/packages/wrangler/src/__tests__/rollback.test.ts +++ b/packages/wrangler/src/__tests__/rollback.test.ts @@ -131,7 +131,7 @@ describe("rollback", () => { }); await runWrangler( - "rollback --name script-name --version-id rollback-version --x-versions" + "rollback --name script-name --version-id rollback-version" ); // Unable to test stdout as the output has weird whitespace. Causing lint to fail with "no-irregular-whitespace" @@ -188,7 +188,7 @@ describe("rollback", () => { }); await runWrangler( - "rollback --name script-name --version-id rollback-version --x-versions" + "rollback --name script-name --version-id rollback-version" ); // Unable to test stdout as the output has weird whitespace. Causing lint to fail with "no-irregular-whitespace" @@ -228,7 +228,7 @@ describe("rollback", () => { mockPostDeployment(true); await runWrangler( - "rollback --name script-name --version-id rollback-version --x-versions" + "rollback --name script-name --version-id rollback-version" ); // Unable to test stdout as the output has weird whitespace. Causing lint to fail with "no-irregular-whitespace" diff --git a/packages/wrangler/src/__tests__/versions/deployments/deployments.list.test.ts b/packages/wrangler/src/__tests__/versions/deployments/deployments.list.test.ts index bdcdfcea53cf..35f713d1b08a 100644 --- a/packages/wrangler/src/__tests__/versions/deployments/deployments.list.test.ts +++ b/packages/wrangler/src/__tests__/versions/deployments/deployments.list.test.ts @@ -20,7 +20,7 @@ describe("deployments list", () => { describe("without wrangler.toml", () => { test("fails with no args", async () => { - const result = runWrangler("deployments list --experimental-versions"); + const result = runWrangler("deployments list"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: You need to provide a name of your worker. Either pass it as a cli arg with \`--name \` or in your config file as \`name = ""\`]` @@ -32,9 +32,7 @@ describe("deployments list", () => { }); test("prints deployments to stdout", async () => { - const result = runWrangler( - "deployments list --name test-name --experimental-versions" - ); + const result = runWrangler("deployments list --name test-name"); await expect(result).resolves.toBeUndefined(); @@ -101,9 +99,7 @@ describe("deployments list", () => { }); test("prints deployments to stdout as --json", async () => { - const result = runWrangler( - "deployments list --name test-name --json --experimental-versions" - ); + const result = runWrangler("deployments list --name test-name --json"); await expect(result).resolves.toBeUndefined(); @@ -199,7 +195,7 @@ describe("deployments list", () => { beforeEach(() => writeWranglerConfig()); test("prints deployments to stdout", async () => { - const result = runWrangler("deployments list --experimental-versions"); + const result = runWrangler("deployments list"); await expect(result).resolves.toBeUndefined(); @@ -266,9 +262,7 @@ describe("deployments list", () => { }); test("prints deployments to stdout as --json", async () => { - const result = runWrangler( - "deployments list --json --experimental-versions" - ); + const result = runWrangler("deployments list --json"); await expect(result).resolves.toBeUndefined(); diff --git a/packages/wrangler/src/__tests__/versions/deployments/deployments.status.test.ts b/packages/wrangler/src/__tests__/versions/deployments/deployments.status.test.ts index ef088d4401b9..cd35f5ef7adb 100644 --- a/packages/wrangler/src/__tests__/versions/deployments/deployments.status.test.ts +++ b/packages/wrangler/src/__tests__/versions/deployments/deployments.status.test.ts @@ -20,9 +20,7 @@ describe("deployments list", () => { describe("without wrangler.toml", () => { test("fails with no args", async () => { - const result = runWrangler( - "deployments status --experimental-gradual-rollouts" - ); + const result = runWrangler("deployments status"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: You need to provide a name of your worker. Either pass it as a cli arg with \`--name \` or in your config file as \`name = ""\`]` @@ -34,9 +32,7 @@ describe("deployments list", () => { }); test("prints latest deployment to stdout", async () => { - const result = runWrangler( - "deployments status --name test-name --experimental-gradual-rollouts" - ); + const result = runWrangler("deployments status --name test-name"); await expect(result).resolves.toBeUndefined(); @@ -61,9 +57,7 @@ describe("deployments list", () => { }); test("prints latest deployment to stdout as --json", async () => { - const result = runWrangler( - "deployments status --name test-name --json --experimental-versions" - ); + const result = runWrangler("deployments status --name test-name --json"); await expect(result).resolves.toBeUndefined(); @@ -98,9 +92,7 @@ describe("deployments list", () => { beforeEach(() => writeWranglerConfig()); test("prints latest deployment to stdout", async () => { - const result = runWrangler( - "deployments status --experimental-gradual-rollouts" - ); + const result = runWrangler("deployments status"); await expect(result).resolves.toBeUndefined(); @@ -125,9 +117,7 @@ describe("deployments list", () => { }); test("prints latest deployment to stdout as --json", async () => { - const result = runWrangler( - "deployments status --json --experimental-versions" - ); + const result = runWrangler("deployments status --json"); await expect(result).resolves.toBeUndefined(); diff --git a/packages/wrangler/src/__tests__/versions/deployments/deployments.view.test.ts b/packages/wrangler/src/__tests__/versions/deployments/deployments.view.test.ts index eb3f28ab27da..e136b10e0dbd 100644 --- a/packages/wrangler/src/__tests__/versions/deployments/deployments.view.test.ts +++ b/packages/wrangler/src/__tests__/versions/deployments/deployments.view.test.ts @@ -6,7 +6,7 @@ describe("deployments view", () => { mockConsoleMethods(); test("error when run with no args", async () => { - const result = runWrangler("deployments view --x-versions"); + const result = runWrangler("deployments view"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: \`wrangler deployments view\` has been renamed \`wrangler deployments status\`. Please use that command instead.]` @@ -15,7 +15,7 @@ describe("deployments view", () => { }); test("error when run with positional arg", async () => { - const result = runWrangler("deployments view dummy-id --x-versions"); + const result = runWrangler("deployments view dummy-id"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: \`wrangler deployments view \` has been renamed \`wrangler versions view [version-id]\`. Please use that command instead.]` diff --git a/packages/wrangler/src/__tests__/versions/secrets/bulk.test.ts b/packages/wrangler/src/__tests__/versions/secrets/bulk.test.ts index 8444cd96fb1c..b63be741d9b9 100644 --- a/packages/wrangler/src/__tests__/versions/secrets/bulk.test.ts +++ b/packages/wrangler/src/__tests__/versions/secrets/bulk.test.ts @@ -22,7 +22,7 @@ describe("versions secret bulk", () => { vi.spyOn(readline, "createInterface").mockImplementation( () => null as unknown as Interface ); - await runWrangler(`versions secret bulk --name script-name --x-versions`); + await runWrangler(`versions secret bulk --name script-name`); expect(std.out).toMatchInlineSnapshot( `"🌀 Creating the secrets for the Worker \\"script-name\\" "` ); @@ -59,9 +59,7 @@ describe("versions secret bulk", () => { expect(metadata.keep_assets).toBeTruthy(); }); - await runWrangler( - `versions secret bulk secrets.json --name script-name --x-versions` - ); + await runWrangler(`versions secret bulk secrets.json --name script-name`); expect(std.out).toMatchInlineSnapshot( ` "🌀 Creating the secrets for the Worker \\"script-name\\" @@ -112,7 +110,7 @@ describe("versions secret bulk", () => { expect(metadata.keep_assets).toBeTruthy(); }); - await runWrangler(`versions secret bulk --name script-name --x-versions`); + await runWrangler(`versions secret bulk --name script-name`); expect(std.out).toMatchInlineSnapshot( ` "🌀 Creating the secrets for the Worker \\"script-name\\" @@ -129,9 +127,7 @@ describe("versions secret bulk", () => { test("should error on invalid json file", async () => { await writeFile("secrets.json", "not valid json :(", { encoding: "utf8" }); - await runWrangler( - `versions secret bulk secrets.json --name script-name --x-versions` - ); + await runWrangler(`versions secret bulk secrets.json --name script-name`); expect(std.out).toMatchInlineSnapshot( `"🌀 Creating the secrets for the Worker \\"script-name\\" "` ); @@ -163,7 +159,7 @@ describe("versions secret bulk", () => { expect(metadata.keep_assets).toBeTruthy(); }); - await runWrangler(`versions secret bulk --name script-name --x-versions`); + await runWrangler(`versions secret bulk --name script-name`); expect(std.out).toMatchInlineSnapshot( `"🌀 Creating the secrets for the Worker \\"script-name\\" "` ); diff --git a/packages/wrangler/src/__tests__/versions/secrets/delete.test.ts b/packages/wrangler/src/__tests__/versions/secrets/delete.test.ts index dd063c3c8fca..e5cb31e8ebfc 100644 --- a/packages/wrangler/src/__tests__/versions/secrets/delete.test.ts +++ b/packages/wrangler/src/__tests__/versions/secrets/delete.test.ts @@ -38,9 +38,7 @@ describe("versions secret delete", () => { // We will not be inherting secret_text as that would bring back SECRET expect(metadata.keep_bindings).toStrictEqual(["secret_key"]); }); - await runWrangler( - "versions secret delete SECRET --name script-name --x-versions" - ); + await runWrangler("versions secret delete SECRET --name script-name"); expect(std.out).toMatchInlineSnapshot(` "🌀 Deleting the secret SECRET on the Worker script-name @@ -64,9 +62,7 @@ describe("versions secret delete", () => { expect(metadata.keep_bindings).toStrictEqual(["secret_key"]); }); - await runWrangler( - "versions secret delete SECRET --name script-name --x-versions" - ); + await runWrangler("versions secret delete SECRET --name script-name"); expect(std.out).toMatchInlineSnapshot(` "? Are you sure you want to permanently delete the secret SECRET on the Worker script-name? @@ -93,7 +89,7 @@ describe("versions secret delete", () => { expect(metadata.keep_bindings).toStrictEqual(["secret_key"]); }); - await runWrangler("versions secret delete SECRET --x-versions"); + await runWrangler("versions secret delete SECRET"); expect(std.out).toMatchInlineSnapshot(` "? Are you sure you want to permanently delete the secret SECRET on the Worker script-name? diff --git a/packages/wrangler/src/__tests__/versions/secrets/list.test.ts b/packages/wrangler/src/__tests__/versions/secrets/list.test.ts index bda2e6150550..3d9def8ba658 100644 --- a/packages/wrangler/src/__tests__/versions/secrets/list.test.ts +++ b/packages/wrangler/src/__tests__/versions/secrets/list.test.ts @@ -101,7 +101,7 @@ describe("versions secret list", () => { mockGetDeployments(); mockGetVersion("version-id-1"); - await runWrangler("versions secret list --name script-name --x-versions"); + await runWrangler("versions secret list --name script-name"); expect(std.out).toMatchInlineSnapshot(` "-- Version version-id-1 (100%) secrets -- @@ -118,7 +118,7 @@ describe("versions secret list", () => { mockGetVersion("version-id-1"); mockGetVersion("version-id-2"); - await runWrangler("versions secret list --name script-name --x-versions"); + await runWrangler("versions secret list --name script-name"); expect(std.out).toMatchInlineSnapshot(` "-- Version version-id-1 (50%) secrets -- @@ -141,7 +141,7 @@ describe("versions secret list", () => { mockGetDeployments(); mockGetVersion("version-id-1"); - await runWrangler("versions secret list --x-versions"); + await runWrangler("versions secret list"); expect(std.out).toMatchInlineSnapshot(` "-- Version version-id-1 (100%) secrets -- @@ -245,7 +245,7 @@ describe("versions secret list", () => { mockGetDeployments(); mockGetVersion("version-id-1"); - await runWrangler("versions secret list --latest-version --x-versions"); + await runWrangler("versions secret list --latest-version"); expect(std.out).toMatchInlineSnapshot(` "-- Version version-id-3 (0%) secrets -- diff --git a/packages/wrangler/src/__tests__/versions/secrets/put.test.ts b/packages/wrangler/src/__tests__/versions/secrets/put.test.ts index 7682c0113d2e..3489c94769e7 100644 --- a/packages/wrangler/src/__tests__/versions/secrets/put.test.ts +++ b/packages/wrangler/src/__tests__/versions/secrets/put.test.ts @@ -43,9 +43,7 @@ describe("versions secret put", () => { ]); expect(metadata.keep_assets).toBeTruthy(); }); - await runWrangler( - "versions secret put NEW_SECRET --name script-name --x-versions" - ); + await runWrangler("versions secret put NEW_SECRET --name script-name"); expect(std.out).toMatchInlineSnapshot(` "🌀 Creating the secret for the Worker \\"script-name\\" @@ -67,10 +65,7 @@ describe("versions secret put", () => { mockSetupApiCalls(); mockPostVersion(); - await runWrangler( - "versions secret put NEW_SECRET --name script-name --x-versions" - ); - + await runWrangler("versions secret put NEW_SECRET --name script-name"); expect(std.warn).toMatchInlineSnapshot(`""`); expect(std.err).toMatchInlineSnapshot(`""`); }); @@ -131,7 +126,7 @@ describe("versions secret put", () => { ]); expect(metadata.keep_assets).toBeTruthy(); }); - await runWrangler("versions secret put NEW_SECRET --x-versions"); + await runWrangler("versions secret put NEW_SECRET"); expect(std.out).toMatchInlineSnapshot(` "🌀 Creating the secret for the Worker \\"script-name\\" @@ -167,7 +162,7 @@ describe("versions secret put", () => { ).toBe("Deploy a new secret"); }); await runWrangler( - "versions secret put NEW_SECRET --name script-name --message 'Deploy a new secret' --x-versions" + "versions secret put NEW_SECRET --name script-name --message 'Deploy a new secret'" ); expect(std.out).toMatchInlineSnapshot(` @@ -207,7 +202,7 @@ describe("versions secret put", () => { ).toBe("v1"); }); await runWrangler( - "versions secret put NEW_SECRET --name script-name --message 'Deploy a new secret' --tag v1 --x-versions" + "versions secret put NEW_SECRET --name script-name --message 'Deploy a new secret' --tag v1" ); expect(std.out).toMatchInlineSnapshot(` @@ -244,7 +239,7 @@ describe("versions secret put", () => { ).toBe("Deploy a new secret"); }); await runWrangler( - "versions secret put SECRET --name script-name --message 'Deploy a new secret' --x-versions" + "versions secret put SECRET --name script-name --message 'Deploy a new secret'" ); expect(std.out).toMatchInlineSnapshot(` @@ -320,7 +315,7 @@ describe("versions secret put", () => { ).toBe("Deploy a new secret"); }); await runWrangler( - "versions secret put SECRET --name script-name --message 'Deploy a new secret' --x-versions" + "versions secret put SECRET --name script-name --message 'Deploy a new secret'" ); expect(std.out).toMatchInlineSnapshot(` diff --git a/packages/wrangler/src/__tests__/versions/versions.deploy.test.ts b/packages/wrangler/src/__tests__/versions/versions.deploy.test.ts index 29f93f21c26c..1da5f4b14c16 100644 --- a/packages/wrangler/src/__tests__/versions/versions.deploy.test.ts +++ b/packages/wrangler/src/__tests__/versions/versions.deploy.test.ts @@ -89,7 +89,7 @@ describe("versions deploy", () => { describe("without wrangler.toml", () => { test("succeeds with --name arg", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --name named-worker --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --name named-worker --yes" ); await expect(result).resolves.toMatchInlineSnapshot(`undefined`); @@ -140,7 +140,7 @@ describe("versions deploy", () => { test("fails without --name arg", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --yes" ); await expect(result).rejects.toMatchInlineSnapshot( @@ -153,9 +153,7 @@ describe("versions deploy", () => { beforeEach(() => writeWranglerConfig()); test("no args", async () => { - const result = runWrangler( - "versions deploy --yes --experimental-gradual-rollouts" - ); + const result = runWrangler("versions deploy --yes"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: You must select at least 1 version to deploy.]` @@ -188,7 +186,7 @@ describe("versions deploy", () => { test("1 version @ (implicit) 100%", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --yes" ); await expect(result).resolves.toBeUndefined(); @@ -235,7 +233,7 @@ describe("versions deploy", () => { test("1 version @ (explicit) 100%", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000@100% --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000@100% --yes" ); await expect(result).resolves.toBeUndefined(); @@ -282,7 +280,7 @@ describe("versions deploy", () => { test("2 versions @ (implicit) 50% each", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 20000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 20000000-0000-0000-0000-000000000000 --yes" ); await expect(result).resolves.toBeUndefined(); @@ -337,7 +335,7 @@ describe("versions deploy", () => { test("1 version @ (explicit) 100%", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000@100% --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000@100% --yes" ); await expect(result).resolves.toBeUndefined(); @@ -384,7 +382,7 @@ describe("versions deploy", () => { test("2 versions @ (explicit) 30% + (implicit) 70%", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000@30% 20000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000@30% 20000000-0000-0000-0000-000000000000 --yes" ); await expect(result).resolves.toBeUndefined(); @@ -439,7 +437,7 @@ describe("versions deploy", () => { test("2 versions @ (explicit) 40% + (explicit) 60%", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000@40% 20000000-0000-0000-0000-000000000000@60% --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000@40% 20000000-0000-0000-0000-000000000000@60% --yes" ); await expect(result).resolves.toBeUndefined(); @@ -495,7 +493,7 @@ describe("versions deploy", () => { describe("max versions restrictions (temp)", () => { test("2+ versions fails", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 20000000-0000-0000-0000-000000000000 30000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 20000000-0000-0000-0000-000000000000 30000000-0000-0000-0000-000000000000 --yes" ); await expect(result).rejects.toMatchInlineSnapshot( @@ -544,7 +542,7 @@ describe("versions deploy", () => { test("--max-versions allows > 2 versions", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 20000000-0000-0000-0000-000000000000 30000000-0000-0000-0000-000000000000 --max-versions=3 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 20000000-0000-0000-0000-000000000000 30000000-0000-0000-0000-000000000000 --max-versions=3 --yes" ); await expect(result).resolves.toBeUndefined(); @@ -610,7 +608,7 @@ describe("versions deploy", () => { test("with a message", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --message 'My versioned deployment message' --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --message 'My versioned deployment message' --yes" ); await expect(result).resolves.toBeUndefined(); @@ -662,7 +660,7 @@ describe("versions deploy", () => { }); const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --yes" ); await expect(result).resolves.toBeUndefined(); @@ -720,7 +718,7 @@ describe("versions deploy", () => { }); const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --yes" ); await expect(result).resolves.toBeUndefined(); @@ -785,7 +783,7 @@ describe("versions deploy", () => { }); const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --yes" ); await expect(result).resolves.toBeUndefined(); @@ -840,7 +838,7 @@ describe("versions deploy", () => { test("fails for non-existent versionId", async () => { const result = runWrangler( - "versions deploy ffffffff-ffff-ffff-ffff-ffffffffffff --yes --experimental-gradual-rollouts" + "versions deploy ffffffff-ffff-ffff-ffff-ffffffffffff --yes" ); // TODO: could do with a better error message but this will suffice for now (this error isn't possible in the interactive flow) @@ -872,7 +870,7 @@ describe("versions deploy", () => { test("fails if --percentage > 100", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --percentage 101 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --percentage 101 --yes" ); await expect(result).rejects.toMatchInlineSnapshot( @@ -884,7 +882,7 @@ describe("versions deploy", () => { test("fails if --percentage < 0", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --percentage -1 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --percentage -1 --yes" ); await expect(result).rejects.toMatchInlineSnapshot( @@ -896,7 +894,7 @@ describe("versions deploy", () => { test("fails if version-spec percentage > 100", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --percentage 101 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --percentage 101 --yes" ); await expect(result).rejects.toMatchInlineSnapshot( @@ -908,7 +906,7 @@ describe("versions deploy", () => { test("fails if version-spec percentage < 0", async () => { const result = runWrangler( - "versions deploy 10000000-0000-0000-0000-000000000000 --percentage -1 --yes --experimental-gradual-rollouts" + "versions deploy 10000000-0000-0000-0000-000000000000 --percentage -1 --yes" ); await expect(result).rejects.toMatchInlineSnapshot( diff --git a/packages/wrangler/src/__tests__/versions/versions.help.test.ts b/packages/wrangler/src/__tests__/versions/versions.help.test.ts index 61e51721eec1..42ef353a0325 100644 --- a/packages/wrangler/src/__tests__/versions/versions.help.test.ts +++ b/packages/wrangler/src/__tests__/versions/versions.help.test.ts @@ -5,78 +5,6 @@ import { runWrangler } from "../helpers/run-wrangler"; describe("versions --help", () => { const std = mockConsoleMethods(); - test("shows generic help w/ --help flag and --no-experimental-versions flag", async () => { - const result = runWrangler("versions --help --no-experimental-versions"); - - await expect(result).resolves.toBeUndefined(); - - expect(std.out).toMatchInlineSnapshot(` - "wrangler - - COMMANDS - wrangler docs [search..] 📚 Open Wrangler's command documentation in your browser - - wrangler init [name] 📥 Initialize a basic Worker - wrangler dev [script] 👂 Start a local server for developing your Worker - wrangler deploy [script] 🆙 Deploy a Worker to Cloudflare [aliases: publish] - wrangler deployments 🚢 List and view the current and past deployments for your Worker - wrangler rollback [deployment-id] 🔙 Rollback a deployment for a Worker - wrangler delete [script] 🗑 Delete a Worker from Cloudflare - wrangler tail [worker] 🦚 Start a log tailing session for a Worker - wrangler secret 🤫 Generate a secret that can be referenced in a Worker - wrangler types [path] 📝 Generate types from bindings and module rules in configuration - - wrangler kv 🗂️ Manage Workers KV Namespaces - wrangler queues 🇶 Manage Workers Queues - wrangler r2 📦 Manage R2 buckets & objects - wrangler d1 🗄 Manage Workers D1 databases - wrangler vectorize 🧮 Manage Vectorize indexes [open beta] - wrangler hyperdrive 🚀 Manage Hyperdrive databases - wrangler pages ⚡️ Configure Cloudflare Pages - wrangler mtls-certificate 🪪 Manage certificates used for mTLS connections - wrangler pubsub 📮 Manage Pub/Sub brokers [private beta] - wrangler dispatch-namespace 🏗️ Manage dispatch namespaces - wrangler ai 🤖 Manage AI models - wrangler workflows 🔁 Manage Workflows [open-beta] - wrangler login 🔓 Login to Cloudflare - wrangler logout 🚪 Logout from Cloudflare - wrangler whoami 🕵️ Retrieve your user information - - GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - -e, --env Environment to use for operations and .env files [string] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] - - Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose" - `); - }); - - test("shows versions help w/ --help and --experimental-versions flag", async () => { - const result = runWrangler("versions --help --experimental-versions"); - - await expect(result).resolves.toBeUndefined(); - - expect(std.out).toMatchInlineSnapshot(` - "wrangler versions - - 🫧 List, view, upload and deploy Versions of your Worker to Cloudflare - - COMMANDS - wrangler versions view View the details of a specific version of your Worker [open-beta] - wrangler versions list List the 10 most recent Versions of your Worker [open-beta] - wrangler versions upload Uploads your Worker code and config as a new Version [open-beta] - wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [open-beta] - wrangler versions secret Generate a secret that can be referenced in a Worker - - GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - -e, --env Environment to use for operations and .env files [string] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" - `); - }); - test("shows versions help w/ --help", async () => { const result = runWrangler("versions --help"); @@ -88,10 +16,10 @@ describe("versions --help", () => { 🫧 List, view, upload and deploy Versions of your Worker to Cloudflare COMMANDS - wrangler versions view View the details of a specific version of your Worker [open-beta] - wrangler versions list List the 10 most recent Versions of your Worker [open-beta] - wrangler versions upload Uploads your Worker code and config as a new Version [open-beta] - wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [open-beta] + wrangler versions view View the details of a specific version of your Worker [stable] + wrangler versions list List the 10 most recent Versions of your Worker [stable] + wrangler versions upload Uploads your Worker code and config as a new Version [stable] + wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [stable] wrangler versions secret Generate a secret that can be referenced in a Worker GLOBAL FLAGS @@ -106,14 +34,6 @@ describe("versions --help", () => { describe("versions subhelp", () => { const std = mockConsoleMethods(); - test("fails with --no-experimental-versions flag", async () => { - const result = runWrangler("versions --no-experimental-versions"); - - await expect(result).rejects.toMatchInlineSnapshot( - `[Error: Unknown argument: versions]` - ); - }); - test("shows implicit subhelp", async () => { const result = runWrangler("versions"); @@ -126,88 +46,10 @@ describe("versions subhelp", () => { 🫧 List, view, upload and deploy Versions of your Worker to Cloudflare COMMANDS - wrangler versions view View the details of a specific version of your Worker [open-beta] - wrangler versions list List the 10 most recent Versions of your Worker [open-beta] - wrangler versions upload Uploads your Worker code and config as a new Version [open-beta] - wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [open-beta] - wrangler versions secret Generate a secret that can be referenced in a Worker - - GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - -e, --env Environment to use for operations and .env files [string] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" - `); - }); - - test("shows implicit subhelp with --experimental-versions flag", async () => { - const result = runWrangler("versions --experimental-versions"); - - await expect(result).resolves.toBeUndefined(); - await setImmediate(); // wait for subhelp - - expect(std.out).toMatchInlineSnapshot(` - "wrangler versions - - 🫧 List, view, upload and deploy Versions of your Worker to Cloudflare - - COMMANDS - wrangler versions view View the details of a specific version of your Worker [open-beta] - wrangler versions list List the 10 most recent Versions of your Worker [open-beta] - wrangler versions upload Uploads your Worker code and config as a new Version [open-beta] - wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [open-beta] - wrangler versions secret Generate a secret that can be referenced in a Worker - - GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - -e, --env Environment to use for operations and .env files [string] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" - `); - }); - - test("shows implicit subhelp with --x-versions flag", async () => { - const result = runWrangler("versions --x-versions"); - - await expect(result).resolves.toBeUndefined(); - await setImmediate(); // wait for subhelp - - expect(std.out).toMatchInlineSnapshot(` - "wrangler versions - - 🫧 List, view, upload and deploy Versions of your Worker to Cloudflare - - COMMANDS - wrangler versions view View the details of a specific version of your Worker [open-beta] - wrangler versions list List the 10 most recent Versions of your Worker [open-beta] - wrangler versions upload Uploads your Worker code and config as a new Version [open-beta] - wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [open-beta] - wrangler versions secret Generate a secret that can be referenced in a Worker - - GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - -e, --env Environment to use for operations and .env files [string] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" - `); - }); - - test("shows implicit subhelp with --experimental-gradual-rollouts flag", async () => { - const result = runWrangler("versions --experimental-gradual-rollouts"); - - await expect(result).resolves.toBeUndefined(); - await setImmediate(); // wait for subhelp - - expect(std.out).toMatchInlineSnapshot(` - "wrangler versions - - 🫧 List, view, upload and deploy Versions of your Worker to Cloudflare - - COMMANDS - wrangler versions view View the details of a specific version of your Worker [open-beta] - wrangler versions list List the 10 most recent Versions of your Worker [open-beta] - wrangler versions upload Uploads your Worker code and config as a new Version [open-beta] - wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [open-beta] + wrangler versions view View the details of a specific version of your Worker [stable] + wrangler versions list List the 10 most recent Versions of your Worker [stable] + wrangler versions upload Uploads your Worker code and config as a new Version [stable] + wrangler versions deploy [version-specs..] Safely roll out new Versions of your Worker by splitting traffic between multiple Versions [stable] wrangler versions secret Generate a secret that can be referenced in a Worker GLOBAL FLAGS diff --git a/packages/wrangler/src/__tests__/versions/versions.list.test.ts b/packages/wrangler/src/__tests__/versions/versions.list.test.ts index a1eeefda1c0d..35d3f8d8c0cc 100644 --- a/packages/wrangler/src/__tests__/versions/versions.list.test.ts +++ b/packages/wrangler/src/__tests__/versions/versions.list.test.ts @@ -20,9 +20,7 @@ describe("versions list", () => { describe("without wrangler.toml", () => { test("fails with no args", async () => { - const result = runWrangler( - "versions list --json --experimental-versions" - ); + const result = runWrangler("versions list --json"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: You need to provide a name of your worker. Either pass it as a cli arg with \`--name \` or in your config file as \`name = ""\`]` @@ -34,9 +32,7 @@ describe("versions list", () => { }); test("prints versions to stdout", async () => { - const result = runWrangler( - "versions list --name test-name --experimental-versions" - ); + const result = runWrangler("versions list --name test-name"); await expect(result).resolves.toBeUndefined(); @@ -76,9 +72,7 @@ describe("versions list", () => { }); test("prints versions to stdout as --json", async () => { - const result = runWrangler( - "versions list --name test-name --json --experimental-versions" - ); + const result = runWrangler("versions list --name test-name --json"); await expect(result).resolves.toBeUndefined(); @@ -156,7 +150,7 @@ describe("versions list", () => { beforeEach(() => writeWranglerConfig()); test("prints versions to stdout", async () => { - const result = runWrangler("versions list --experimental-versions"); + const result = runWrangler("versions list"); await expect(result).resolves.toBeUndefined(); @@ -196,9 +190,7 @@ describe("versions list", () => { }); test("prints versions to as --json", async () => { - const result = runWrangler( - "versions list --json --experimental-versions" - ); + const result = runWrangler("versions list --json"); await expect(result).resolves.toBeUndefined(); diff --git a/packages/wrangler/src/__tests__/versions/versions.upload.test.ts b/packages/wrangler/src/__tests__/versions/versions.upload.test.ts index 8a2e46fd12c9..1cdeefa362ac 100644 --- a/packages/wrangler/src/__tests__/versions/versions.upload.test.ts +++ b/packages/wrangler/src/__tests__/versions/versions.upload.test.ts @@ -86,7 +86,7 @@ describe("versions upload", () => { writeWorkerSource(); setIsTTY(false); - const result = runWrangler("versions upload --x-versions"); + const result = runWrangler("versions upload"); await expect(result).resolves.toBeUndefined(); @@ -124,7 +124,7 @@ describe("versions upload", () => { writeWorkerSource(); setIsTTY(false); - const result = runWrangler("versions upload --x-versions"); + const result = runWrangler("versions upload"); await expect(result).resolves.toBeUndefined(); @@ -156,7 +156,7 @@ describe("versions upload", () => { writeWorkerSource(); setIsTTY(false); - const result = runWrangler("versions upload --x-versions"); + const result = runWrangler("versions upload"); await expect(result).resolves.toBeUndefined(); diff --git a/packages/wrangler/src/__tests__/versions/versions.view.test.ts b/packages/wrangler/src/__tests__/versions/versions.view.test.ts index d423deb6b7f7..9452fbd5c4c2 100644 --- a/packages/wrangler/src/__tests__/versions/versions.view.test.ts +++ b/packages/wrangler/src/__tests__/versions/versions.view.test.ts @@ -18,9 +18,7 @@ describe("versions view", () => { beforeEach(() => msw.use(mswGetVersion())); test("fails with no args", async () => { - const result = runWrangler( - "versions view --experimental-gradual-rollouts" - ); + const result = runWrangler("versions view"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: Not enough non-option arguments: got 0, need at least 1]` @@ -32,9 +30,7 @@ describe("versions view", () => { }); test("fails with --name arg only", async () => { - const result = runWrangler( - "versions view --name test-name --experimental-gradual-rollouts" - ); + const result = runWrangler("versions view --name test-name"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: Not enough non-option arguments: got 0, need at least 1]` @@ -47,7 +43,7 @@ describe("versions view", () => { test("fails with positional version-id arg only", async () => { const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --experimental-gradual-rollouts" + "versions view 10000000-0000-0000-0000-000000000000" ); await expect(result).rejects.toMatchInlineSnapshot( @@ -61,7 +57,7 @@ describe("versions view", () => { test("succeeds with positional version-id arg and --name arg", async () => { const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test-name --experimental-gradual-rollouts" + "versions view 10000000-0000-0000-0000-000000000000 --name test-name" ); await expect(result).resolves.toBeUndefined(); @@ -94,7 +90,7 @@ describe("versions view", () => { test("prints version to stdout as --json", async () => { const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test-name --json --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --name test-name --json" ); await expect(result).resolves.toBeUndefined(); @@ -159,9 +155,7 @@ describe("versions view", () => { }); test("fails with no args", async () => { - const result = runWrangler( - "versions view --experimental-gradual-rollouts" - ); + const result = runWrangler("versions view"); await expect(result).rejects.toMatchInlineSnapshot( `[Error: Not enough non-option arguments: got 0, need at least 1]` @@ -174,7 +168,7 @@ describe("versions view", () => { test("succeeds with positional version-id arg only", async () => { const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --experimental-gradual-rollouts" + "versions view 10000000-0000-0000-0000-000000000000" ); await expect(result).resolves.toBeUndefined(); @@ -207,7 +201,7 @@ describe("versions view", () => { test("fails with non-existent version-id", async () => { const result = runWrangler( - "versions view ffffffff-ffff-ffff-ffff-ffffffffffff --experimental-gradual-rollouts" + "versions view ffffffff-ffff-ffff-ffff-ffffffffffff" ); await expect(result).rejects.toMatchInlineSnapshot( @@ -221,7 +215,7 @@ describe("versions view", () => { test("prints version to stdout as --json", async () => { const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --json --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --json" ); await expect(result).resolves.toBeUndefined(); @@ -308,7 +302,7 @@ describe("versions view", () => { ); const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --name test" ); await expect(result).resolves.toBeUndefined(); @@ -355,7 +349,7 @@ describe("versions view", () => { ); const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --name test" ); await expect(result).resolves.toBeUndefined(); @@ -404,7 +398,7 @@ describe("versions view", () => { ); const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --name test" ); await expect(result).resolves.toBeUndefined(); @@ -457,7 +451,7 @@ describe("versions view", () => { ); const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --name test" ); await expect(result).resolves.toBeUndefined(); @@ -513,7 +507,7 @@ describe("versions view", () => { ); const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --name test" ); await expect(result).resolves.toBeUndefined(); @@ -645,7 +639,7 @@ describe("versions view", () => { ); const result = runWrangler( - "versions view 10000000-0000-0000-0000-000000000000 --name test --experimental-versions" + "versions view 10000000-0000-0000-0000-000000000000 --name test" ); await expect(result).resolves.toBeUndefined(); diff --git a/packages/wrangler/src/api/dev.ts b/packages/wrangler/src/api/dev.ts index f03e478af4b6..96d1cf8b8e8b 100644 --- a/packages/wrangler/src/api/dev.ts +++ b/packages/wrangler/src/api/dev.ts @@ -218,7 +218,6 @@ export async function unstable_dev( logLevel: options?.logLevel ?? defaultLogLevel, port: options?.port ?? 0, experimentalProvision: undefined, - experimentalVersions: undefined, experimentalDevEnv: undefined, experimentalRegistry: fileBasedRegistry, experimentalVectorizeBindToProd: vectorizeBindToProd ?? false, diff --git a/packages/wrangler/src/deploy/deploy.ts b/packages/wrangler/src/deploy/deploy.ts index b95fa38feaaa..c6f71f93de79 100644 --- a/packages/wrangler/src/deploy/deploy.ts +++ b/packages/wrangler/src/deploy/deploy.ts @@ -106,7 +106,6 @@ type Props = { oldAssetTtl: number | undefined; projectRoot: string | undefined; dispatchNamespace: string | undefined; - experimentalVersions: boolean | undefined; }; export type RouteObject = ZoneIdRoute | ZoneNameRoute | CustomDomainRoute; @@ -761,7 +760,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m } // We can use the new versions/deployments APIs if we: - // * have --x-versions enabled (default, but can be disabled with --no-x-versions) // * are uploading a worker that already exists // * aren't a dispatch namespace deploy // * aren't a service env deploy @@ -769,7 +767,6 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m // * we don't have DO migrations // * we aren't an fpw const canUseNewVersionsDeploymentsApi = - props.experimentalVersions && workerExists && props.dispatchNamespace === undefined && prod && diff --git a/packages/wrangler/src/deploy/index.ts b/packages/wrangler/src/deploy/index.ts index 5189e39c74d6..4e257b11168e 100644 --- a/packages/wrangler/src/deploy/index.ts +++ b/packages/wrangler/src/deploy/index.ts @@ -379,7 +379,6 @@ async function deployWorker(args: DeployArgs) { oldAssetTtl: args.oldAssetTtl, projectRoot, dispatchNamespace: args.dispatchNamespace, - experimentalVersions: args.experimentalVersions, }); writeOutput({ diff --git a/packages/wrangler/src/deprecated/index.ts b/packages/wrangler/src/deprecated/index.ts index a2baf0f28281..ae0991669dfe 100644 --- a/packages/wrangler/src/deprecated/index.ts +++ b/packages/wrangler/src/deprecated/index.ts @@ -36,7 +36,6 @@ export async function buildHandler(buildArgs: BuildArgs) { "--outdir=dist", ...(buildArgs.env ? ["--env", buildArgs.env] : []), ...(buildArgs.config ? ["--config", buildArgs.config] : []), - ...(buildArgs.experimentalVersions ? ["--experimental-versions"] : []), ]).parse(); } diff --git a/packages/wrangler/src/generate/index.ts b/packages/wrangler/src/generate/index.ts index b2d9331f6261..849930aaf528 100644 --- a/packages/wrangler/src/generate/index.ts +++ b/packages/wrangler/src/generate/index.ts @@ -57,7 +57,6 @@ export async function generateHandler(args: GenerateArgs) { type: undefined, _: args._, $0: args.$0, - experimentalVersions: args.experimentalVersions, experimentalProvision: args.experimentalProvision, }); } diff --git a/packages/wrangler/src/index.ts b/packages/wrangler/src/index.ts index 9a2489dd6401..44843d72019a 100644 --- a/packages/wrangler/src/index.ts +++ b/packages/wrangler/src/index.ts @@ -316,13 +316,6 @@ export function createCLIParser(argv: string[]) { } return true; }) - .option("experimental-versions", { - describe: `Experimental: support Worker Versions`, - type: "boolean", - default: true, - hidden: true, - alias: ["x-versions", "experimental-gradual-rollouts"], - }) .check((args) => { // Grab locally specified env params from `.env` file const loaded = loadDotEnv(".env", args.env); diff --git a/packages/wrangler/src/triggers/deploy.ts b/packages/wrangler/src/triggers/deploy.ts index 64c46ca04bb3..b1a4771429ae 100644 --- a/packages/wrangler/src/triggers/deploy.ts +++ b/packages/wrangler/src/triggers/deploy.ts @@ -28,7 +28,6 @@ type Props = { routes: string[] | undefined; legacyEnv: boolean | undefined; dryRun: boolean | undefined; - experimentalVersions: boolean | undefined; assetsOptions: AssetsOptions | undefined; }; @@ -276,10 +275,7 @@ export default async function triggersDeploy( const deployMs = Date.now() - start - uploadMs; if (deployments.length > 0) { - const msg = props.experimentalVersions - ? `Deployed ${workerName} triggers` - : `Published ${workerName}`; - logger.log(msg, formatTime(deployMs)); + logger.log(`Deployed ${workerName} triggers`, formatTime(deployMs)); const flatTargets = targets.flat().map( // Append protocol only on workers.dev domains diff --git a/packages/wrangler/src/triggers/index.ts b/packages/wrangler/src/triggers/index.ts index 1a65f770e5a8..ca55b0500eb4 100644 --- a/packages/wrangler/src/triggers/index.ts +++ b/packages/wrangler/src/triggers/index.ts @@ -78,7 +78,6 @@ async function triggersDeployHandler( routes: args.routes, legacyEnv: isLegacyEnv(config), dryRun: args.dryRun, - experimentalVersions: args.experimentalVersions, assetsOptions, }); } diff --git a/packages/wrangler/src/versions/deploy.ts b/packages/wrangler/src/versions/deploy.ts index a2341c6a9d91..ab596e0781d6 100644 --- a/packages/wrangler/src/versions/deploy.ts +++ b/packages/wrangler/src/versions/deploy.ts @@ -45,7 +45,7 @@ export const versionsDeployCommand = createCommand({ description: "Safely roll out new Versions of your Worker by splitting traffic between multiple Versions", owner: "Workers: Authoring and Testing", - status: "open-beta", + status: "stable", }, args: { name: { diff --git a/packages/wrangler/src/versions/list.ts b/packages/wrangler/src/versions/list.ts index 77c18c310248..d8765d9cbf78 100644 --- a/packages/wrangler/src/versions/list.ts +++ b/packages/wrangler/src/versions/list.ts @@ -13,7 +13,7 @@ export const versionsListCommand = createCommand({ metadata: { description: "List the 10 most recent Versions of your Worker", owner: "Workers: Authoring and Testing", - status: "open-beta", + status: "stable", }, args: { name: { diff --git a/packages/wrangler/src/versions/upload.ts b/packages/wrangler/src/versions/upload.ts index 7a5dac6f33a5..06e801906130 100644 --- a/packages/wrangler/src/versions/upload.ts +++ b/packages/wrangler/src/versions/upload.ts @@ -131,7 +131,7 @@ export const versionsUploadCommand = createCommand({ metadata: { description: "Uploads your Worker code and config as a new Version", owner: "Workers: Authoring and Testing", - status: "open-beta", + status: "stable", }, args: { script: { diff --git a/packages/wrangler/src/versions/view.ts b/packages/wrangler/src/versions/view.ts index 2b6fa8bc2f77..044b7543c93f 100644 --- a/packages/wrangler/src/versions/view.ts +++ b/packages/wrangler/src/versions/view.ts @@ -15,7 +15,7 @@ export const versionsViewCommand = createCommand({ metadata: { description: "View the details of a specific version of your Worker", owner: "Workers: Authoring and Testing", - status: "open-beta", + status: "stable", }, args: { "version-id": { diff --git a/packages/wrangler/src/yargs-types.ts b/packages/wrangler/src/yargs-types.ts index 9397389323c7..edb7b63e51c3 100644 --- a/packages/wrangler/src/yargs-types.ts +++ b/packages/wrangler/src/yargs-types.ts @@ -8,7 +8,6 @@ export interface CommonYargsOptions { v: boolean | undefined; config: string | undefined; env: string | undefined; - "experimental-versions": boolean | undefined; "experimental-provision": boolean | undefined; }