diff --git a/src/utils/env.ts b/src/utils/env.ts index b674a72b..dfa6b968 100644 --- a/src/utils/env.ts +++ b/src/utils/env.ts @@ -29,8 +29,6 @@ import { manifestPathFor } from "../types/pkg-manifest"; import { Registry } from "../registry-client"; import { NpmAuth } from "another-npm-registry-client"; -type Region = "us" | "cn"; - export type Env = { cwd: string; systemUser: boolean; @@ -40,7 +38,6 @@ export type Env = { registry: Registry; namespace: DomainName | IpAddress; editorVersion: string | null; - region: Region; }; // Parse env @@ -64,7 +61,6 @@ export const parseEnv = async function ( env.systemUser = false; env.wsl = false; env.editorVersion = null; - env.region = "us"; // log level log.level = options._global.verbose ? "verbose" : "notice"; // color @@ -86,7 +82,6 @@ export const parseEnv = async function ( url: registryUrl("https://packages.unity.cn"), auth: null, }; - env.region = "cn"; log.notice("region", "cn"); } // registry diff --git a/test/test-env.ts b/test/test-env.ts index 3bcbb30e..d3be0014 100644 --- a/test/test-env.ts +++ b/test/test-env.ts @@ -158,7 +158,6 @@ describe("env", function () { should(env).not.be.null(); env!.registry.url.should.be.equal("https://package.openupm.cn"); env!.upstreamRegistry.url.should.be.equal("https://packages.unity.cn"); - env!.region.should.be.equal("cn"); }); it("region cn with a custom registry", async function () { const env = await parseEnv( @@ -173,7 +172,6 @@ describe("env", function () { should(env).not.be.null(); env!.registry.url.should.be.equal("https://reg.custom-package.com"); env!.upstreamRegistry.url.should.be.equal("https://packages.unity.cn"); - env!.region.should.be.equal("cn"); }); }); });