diff --git a/.yarn/versions/d60ffdcd.yml b/.yarn/versions/d60ffdcd.yml new file mode 100644 index 000000000000..2dd67331c299 --- /dev/null +++ b/.yarn/versions/d60ffdcd.yml @@ -0,0 +1,34 @@ +releases: + "@yarnpkg/core": major + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-essentials" + - "@yarnpkg/plugin-exec" + - "@yarnpkg/plugin-file" + - "@yarnpkg/plugin-git" + - "@yarnpkg/plugin-github" + - "@yarnpkg/plugin-http" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-link" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm" + - "@yarnpkg/plugin-npm-cli" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-patch" + - "@yarnpkg/plugin-pnp" + - "@yarnpkg/plugin-pnpm" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - "@yarnpkg/builder" + - "@yarnpkg/cli" + - "@yarnpkg/doctor" + - "@yarnpkg/extensions" + - "@yarnpkg/nm" + - "@yarnpkg/pnpify" + - "@yarnpkg/sdks" diff --git a/CHANGELOG.md b/CHANGELOG.md index 21c7100e2c71..af401a99632c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Yarn now accepts sponsorships! Please give a look at our [OpenCollective](https: - Some legacy layers have been sunset: - Plugins cannot access the Clipanion 2 APIs anymore (upgrade to [Clipanion 3](https://github.com/arcanis/clipanion)) - Plugins cannot access the internal copy of Yup anymore (use [Typanion](https://github.com/arcanis/typanion) instead) +- The network settings configuration option has been renamed from `caFilePath` to `httpsCaFilePath`. ### **API Changes** diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/https.test.js b/packages/acceptance-tests/pkg-tests-specs/sources/https.test.js index 391ba88041bf..93ad454a64ba 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/https.test.js +++ b/packages/acceptance-tests/pkg-tests-specs/sources/https.test.js @@ -26,7 +26,7 @@ describe(`Https tests`, () => { ); test( - `it should install when providing valid CA certificate via root caFilePath`, + `it should install when providing valid CA certificate via root httpsCaFilePath`, makeTemporaryEnv( { dependencies: {[`@private/package`]: `1.0.0`}, @@ -37,7 +37,7 @@ describe(`Https tests`, () => { await writeFile(`${path}/rootCA.crt`, certs.ca.certificate); await writeFile(`${path}/.yarnrc.yml`, [ - `caFilePath: ${path}/rootCA.crt`, + `httpsCaFilePath: ${path}/rootCA.crt`, `npmScopes:`, ` private:`, ` npmRegistryServer: "${url}"`, @@ -68,7 +68,7 @@ describe(`Https tests`, () => { await writeFile(`${path}/.yarnrc.yml`, [ `networkSettings:`, ` "*":`, - ` caFilePath: ${path}/rootCA.crt`, + ` httpsCaFilePath: ${path}/rootCA.crt`, `npmScopes:`, ` private:`, ` npmRegistryServer: "${url}"`, @@ -99,7 +99,7 @@ describe(`Https tests`, () => { await writeFile(`${path}/.yarnrc.yml`, [ `networkSettings:`, ` "localhost":`, - ` caFilePath: ${path}/rootCA.crt`, + ` httpsCaFilePath: ${path}/rootCA.crt`, `npmScopes:`, ` private:`, ` npmRegistryServer: "${url}"`, @@ -130,7 +130,7 @@ describe(`Https tests`, () => { await writeFile(`${path}/.yarnrc.yml`, [ `networkSettings:`, ` "foo":`, - ` caFilePath: ${path}/rootCA.crt`, + ` httpsCaFilePath: ${path}/rootCA.crt`, `npmScopes:`, ` private:`, ` npmRegistryServer: "${url}"`, @@ -152,7 +152,7 @@ describe(`Https tests`, () => { const url = await startPackageServer({type: `https`}); await writeFile(`${path}/.yarnrc.yml`, [ - `caFilePath: ${path}/missing.crt`, + `httpsCaFilePath: ${path}/missing.crt`, `npmScopes:`, ` private:`, ` npmRegistryServer: "${url}"`, diff --git a/packages/gatsby/static/configuration/yarnrc.json b/packages/gatsby/static/configuration/yarnrc.json index ca98cc7b839c..2cbd14042d27 100644 --- a/packages/gatsby/static/configuration/yarnrc.json +++ b/packages/gatsby/static/configuration/yarnrc.json @@ -26,7 +26,7 @@ "format": "uri-reference", "default": "./.yarn/cache" }, - "caFilePath": { + "httpsCaFilePath": { "_package": "@yarnpkg/core", "description": "Path to file containing one or multiple Certificate Authority signing certificates", "type": "string", @@ -365,8 +365,8 @@ "description": "The hostname to override settings for (glob patterns are supported)", "type": "object", "properties": { - "caFilePath": { - "$ref": "#/properties/caFilePath" + "httpsCaFilePath": { + "$ref": "#/properties/httpsCaFilePath" }, "enableNetwork": { "$ref": "#/properties/enableNetwork" @@ -384,7 +384,7 @@ "$ref": "#/properties/httpsProxy" } }, - "_exampleKeys": ["caFilePath", "enableNetwork", "httpProxy", "httpsCertFilePath", "httpsKeyFilePath", "httpsProxy"] + "_exampleKeys": ["httpsCaFilePath", "enableNetwork", "httpProxy", "httpsCertFilePath", "httpsKeyFilePath", "httpsProxy"] } }, "_exampleKeys": ["*.example.com"] diff --git a/packages/yarnpkg-core/sources/Configuration.ts b/packages/yarnpkg-core/sources/Configuration.ts index 3d623363f774..554158cf9256 100644 --- a/packages/yarnpkg-core/sources/Configuration.ts +++ b/packages/yarnpkg-core/sources/Configuration.ts @@ -372,7 +372,7 @@ export const coreDefinitions: {[coreSettingName: string]: SettingsDefinition} = description: ``, type: SettingsType.SHAPE, properties: { - caFilePath: { + httpsCaFilePath: { description: `Path to file containing one or multiple Certificate Authority signing certificates`, type: SettingsType.ABSOLUTE_PATH, default: null, @@ -405,7 +405,7 @@ export const coreDefinitions: {[coreSettingName: string]: SettingsDefinition} = }, }, }, - caFilePath: { + httpsCaFilePath: { description: `A path to a file containing one or multiple Certificate Authority signing certificates`, type: SettingsType.ABSOLUTE_PATH, default: null, @@ -593,14 +593,14 @@ export interface ConfigurationValueMap { httpRetry: number; networkConcurrency: number; networkSettings: Map>; - caFilePath: PortablePath | null; + httpsCaFilePath: PortablePath | null; httpsKeyFilePath: PortablePath | null; httpsCertFilePath: PortablePath | null; enableStrictSsl: boolean; diff --git a/packages/yarnpkg-core/sources/httpUtils.ts b/packages/yarnpkg-core/sources/httpUtils.ts index 10e0b39e0fd3..13bd2e6c94d0 100644 --- a/packages/yarnpkg-core/sources/httpUtils.ts +++ b/packages/yarnpkg-core/sources/httpUtils.ts @@ -124,7 +124,7 @@ export function getNetworkSettings(target: string | URL, opts: { configuration: const mergedNetworkSettings: UndefinableSettings = { enableNetwork: undefined, - caFilePath: undefined, + httpsCaFilePath: undefined, httpProxy: undefined, httpsProxy: undefined, httpsKeyFilePath: undefined, @@ -258,14 +258,14 @@ async function requestImpl(target: string | URL, body: Body, {configuration, hea const socketTimeout = configuration.get(`httpTimeout`); const retry = configuration.get(`httpRetry`); const rejectUnauthorized = configuration.get(`enableStrictSsl`); - const caFilePath = networkConfig.caFilePath; + const httpsCaFilePath = networkConfig.httpsCaFilePath; const httpsCertFilePath = networkConfig.httpsCertFilePath; const httpsKeyFilePath = networkConfig.httpsKeyFilePath; const {default: got} = await import(`got`); - const certificateAuthority = caFilePath - ? await getCachedFile(caFilePath) + const certificateAuthority = httpsCaFilePath + ? await getCachedFile(httpsCaFilePath) : undefined; const certificate = httpsCertFilePath ? await getCachedFile(httpsCertFilePath)