Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .yarn/versions/d60ffdcd.yml
Original file line number Diff line number Diff line change
@@ -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"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
12 changes: 6 additions & 6 deletions packages/acceptance-tests/pkg-tests-specs/sources/https.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`},
Expand All @@ -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}"`,
Expand Down Expand Up @@ -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}"`,
Expand Down Expand Up @@ -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}"`,
Expand Down Expand Up @@ -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}"`,
Expand All @@ -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}"`,
Expand Down
8 changes: 4 additions & 4 deletions packages/gatsby/static/configuration/yarnrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand All @@ -384,7 +384,7 @@
"$ref": "#/properties/httpsProxy"
}
},
"_exampleKeys": ["caFilePath", "enableNetwork", "httpProxy", "httpsCertFilePath", "httpsKeyFilePath", "httpsProxy"]
"_exampleKeys": ["httpsCaFilePath", "enableNetwork", "httpProxy", "httpsCertFilePath", "httpsKeyFilePath", "httpsProxy"]
}
},
"_exampleKeys": ["*.example.com"]
Expand Down
8 changes: 4 additions & 4 deletions packages/yarnpkg-core/sources/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -593,14 +593,14 @@ export interface ConfigurationValueMap {
httpRetry: number;
networkConcurrency: number;
networkSettings: Map<string, miscUtils.ToMapValue<{
caFilePath: PortablePath | null;
httpsCaFilePath: PortablePath | null;
enableNetwork: boolean | null;
httpProxy: string | null;
httpsProxy: string | null;
httpsKeyFilePath: PortablePath | null;
httpsCertFilePath: PortablePath | null;
}>>;
caFilePath: PortablePath | null;
httpsCaFilePath: PortablePath | null;
httpsKeyFilePath: PortablePath | null;
httpsCertFilePath: PortablePath | null;
enableStrictSsl: boolean;
Expand Down
8 changes: 4 additions & 4 deletions packages/yarnpkg-core/sources/httpUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down