diff --git a/.yarn/versions/af0a51e3.yml b/.yarn/versions/af0a51e3.yml new file mode 100644 index 000000000000..eecf034e17cb --- /dev/null +++ b/.yarn/versions/af0a51e3.yml @@ -0,0 +1,34 @@ +releases: + "@yarnpkg/cli": major + "@yarnpkg/core": major + "@yarnpkg/doctor": major + "@yarnpkg/plugin-essentials": major + "@yarnpkg/plugin-exec": major + "@yarnpkg/plugin-file": major + "@yarnpkg/plugin-git": major + "@yarnpkg/plugin-github": major + "@yarnpkg/plugin-http": major + "@yarnpkg/plugin-npm": major + "@yarnpkg/plugin-patch": major + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-link" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm-cli" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-pnp" + - "@yarnpkg/plugin-pnpm" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - "@yarnpkg/builder" + - "@yarnpkg/extensions" + - "@yarnpkg/nm" + - "@yarnpkg/pnpify" + - "@yarnpkg/sdks" diff --git a/CHANGELOG.md b/CHANGELOG.md index 444cf7f5391f..37c754625cb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,8 @@ The following changes only affect people writing Yarn plugins: - `npmConfigUtils.getAuditRegistry` no longer takes a `Manifest` as its first argument. +- The `FetchOptions.skipIntegrityCheck` option has been removed. Use `FetchOptions.cacheOptions.skipIntegrityCheck` instead. + - `MapConfigurationValue` has been removed. Use `miscUtils.ToMapValue` instead. - `Manifest.isManifestFieldCompatible` and `Manifest.prototype.isCompatibleWith{OS,CPU}` have been removed. Use `Manifest.prototype.getConditions` and `structUtils.isPackageCompatible` instead. diff --git a/packages/plugin-essentials/sources/commands/info.ts b/packages/plugin-essentials/sources/commands/info.ts index 94c97fba4a4a..ea28b80c59a8 100644 --- a/packages/plugin-essentials/sources/commands/info.ts +++ b/packages/plugin-essentials/sources/commands/info.ts @@ -227,7 +227,7 @@ export default class InfoCommand extends BaseCommand { const infoTree: treeUtils.TreeNode = {children: infoTreeChildren}; const fetcher = configuration.makeFetcher(); - const fetcherOptions: FetchOptions = {project, fetcher, cache, checksums: project.storedChecksums, report: new ThrowReport(), cacheOptions: {skipIntegrityCheck: true}, skipIntegrityCheck: true}; + const fetcherOptions: FetchOptions = {project, fetcher, cache, checksums: project.storedChecksums, report: new ThrowReport(), cacheOptions: {skipIntegrityCheck: true}}; const builtinInfoBuilders: Array> = [ // Manifest fields diff --git a/packages/plugin-essentials/sources/dedupeUtils.ts b/packages/plugin-essentials/sources/dedupeUtils.ts index 84201468132d..8e88e2d86864 100644 --- a/packages/plugin-essentials/sources/dedupeUtils.ts +++ b/packages/plugin-essentials/sources/dedupeUtils.ts @@ -158,7 +158,6 @@ export async function dedupe(project: Project, {strategy, patterns, cache, repor fetcher, project, report: throwReport, - skipIntegrityCheck: true, cacheOptions: { skipIntegrityCheck: true, }, diff --git a/packages/plugin-essentials/sources/suggestUtils.ts b/packages/plugin-essentials/sources/suggestUtils.ts index 1f818fdc5ac1..6c13a676e8d6 100644 --- a/packages/plugin-essentials/sources/suggestUtils.ts +++ b/packages/plugin-essentials/sources/suggestUtils.ts @@ -369,7 +369,7 @@ export async function fetchDescriptorFrom(ident: Ident, range: string, {project, const fetcher = project.configuration.makeFetcher(); const resolver = project.configuration.makeResolver(); - const fetchOptions: FetchOptions = {project, fetcher, cache, checksums: project.storedChecksums, report, cacheOptions: {skipIntegrityCheck: true}, skipIntegrityCheck: true}; + const fetchOptions: FetchOptions = {project, fetcher, cache, checksums: project.storedChecksums, report, cacheOptions: {skipIntegrityCheck: true}}; const resolveOptions: ResolveOptions = {...fetchOptions, resolver, fetchOptions}; // The descriptor has to be bound for the resolvers that need a parent locator. (e.g. FileResolver) diff --git a/packages/plugin-exec/sources/ExecFetcher.ts b/packages/plugin-exec/sources/ExecFetcher.ts index 999ac28889f0..c4219aeaa670 100644 --- a/packages/plugin-exec/sources/ExecFetcher.ts +++ b/packages/plugin-exec/sources/ExecFetcher.ts @@ -51,7 +51,6 @@ export class ExecFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator), loader: () => this.fetchFromDisk(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-file/sources/FileFetcher.ts b/packages/plugin-file/sources/FileFetcher.ts index 13e4dcd4abb0..e60bc2ce1e78 100644 --- a/packages/plugin-file/sources/FileFetcher.ts +++ b/packages/plugin-file/sources/FileFetcher.ts @@ -33,7 +33,6 @@ export class FileFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the disk`), loader: () => this.fetchFromDisk(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-file/sources/TarballFileFetcher.ts b/packages/plugin-file/sources/TarballFileFetcher.ts index a41873af2ab0..4d9094a9e162 100644 --- a/packages/plugin-file/sources/TarballFileFetcher.ts +++ b/packages/plugin-file/sources/TarballFileFetcher.ts @@ -27,7 +27,6 @@ export class TarballFileFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the disk`), loader: () => this.fetchFromDisk(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-git/sources/GitFetcher.ts b/packages/plugin-git/sources/GitFetcher.ts index fe2a4fce86f0..a0a8bbffb2cd 100644 --- a/packages/plugin-git/sources/GitFetcher.ts +++ b/packages/plugin-git/sources/GitFetcher.ts @@ -31,7 +31,6 @@ export class GitFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the remote repository`), loader: () => this.cloneFromRemote(normalizedLocator, nextOpts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-github/sources/GithubFetcher.ts b/packages/plugin-github/sources/GithubFetcher.ts index a47d3aba96d3..e4694d82dee9 100644 --- a/packages/plugin-github/sources/GithubFetcher.ts +++ b/packages/plugin-github/sources/GithubFetcher.ts @@ -25,7 +25,6 @@ export class GithubFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from GitHub`), loader: () => this.fetchFromNetwork(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-http/sources/TarballHttpFetcher.ts b/packages/plugin-http/sources/TarballHttpFetcher.ts index c67de4b5251f..237578301747 100644 --- a/packages/plugin-http/sources/TarballHttpFetcher.ts +++ b/packages/plugin-http/sources/TarballHttpFetcher.ts @@ -26,7 +26,6 @@ export class TarballHttpFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the remote server`), loader: () => this.fetchFromNetwork(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-npm/sources/NpmHttpFetcher.ts b/packages/plugin-npm/sources/NpmHttpFetcher.ts index d211b37ca27a..1c7e0ba0d1d8 100644 --- a/packages/plugin-npm/sources/NpmHttpFetcher.ts +++ b/packages/plugin-npm/sources/NpmHttpFetcher.ts @@ -32,7 +32,6 @@ export class NpmHttpFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the remote server`), loader: () => this.fetchFromNetwork(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-npm/sources/NpmSemverFetcher.ts b/packages/plugin-npm/sources/NpmSemverFetcher.ts index 86afac506823..3b65821ca2c1 100644 --- a/packages/plugin-npm/sources/NpmSemverFetcher.ts +++ b/packages/plugin-npm/sources/NpmSemverFetcher.ts @@ -34,7 +34,6 @@ export class NpmSemverFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the remote registry`), loader: () => this.fetchFromNetwork(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/plugin-patch/sources/PatchFetcher.ts b/packages/plugin-patch/sources/PatchFetcher.ts index c46af127e6f0..0e820ca877b5 100644 --- a/packages/plugin-patch/sources/PatchFetcher.ts +++ b/packages/plugin-patch/sources/PatchFetcher.ts @@ -27,7 +27,6 @@ export class PatchFetcher implements Fetcher { onHit: () => opts.report.reportCacheHit(locator), onMiss: () => opts.report.reportCacheMiss(locator, `${structUtils.prettyLocator(opts.project.configuration, locator)} can't be found in the cache and will be fetched from the disk`), loader: () => this.patchPackage(locator, opts), - skipIntegrityCheck: opts.skipIntegrityCheck, ...opts.cacheOptions, }); diff --git a/packages/yarnpkg-core/sources/Fetcher.ts b/packages/yarnpkg-core/sources/Fetcher.ts index ad1b52bb3f3a..654dcb386b67 100644 --- a/packages/yarnpkg-core/sources/Fetcher.ts +++ b/packages/yarnpkg-core/sources/Fetcher.ts @@ -15,10 +15,6 @@ export type FetchOptions = MinimalFetchOptions & { cacheOptions?: CacheOptions; checksums: Map; report: Report; - /** - * @deprecated Use cacheOptions.skipIntegrityCheck instead - */ - skipIntegrityCheck?: boolean; }; export type FetchResult = { diff --git a/packages/yarnpkg-core/sources/Project.ts b/packages/yarnpkg-core/sources/Project.ts index a622e19434b6..490fbd7d3ca7 100644 --- a/packages/yarnpkg-core/sources/Project.ts +++ b/packages/yarnpkg-core/sources/Project.ts @@ -1035,7 +1035,7 @@ export class Project { }; const fetcher = optFetcher || this.configuration.makeFetcher(); - const fetcherOptions: FetchOptions = {checksums: this.storedChecksums, project: this, cache, fetcher, report, skipIntegrityCheck: true, cacheOptions}; + const fetcherOptions: FetchOptions = {checksums: this.storedChecksums, project: this, cache, fetcher, report, cacheOptions}; const linkers = this.configuration.getLinkers(); const linkerOptions: LinkOptions = {project: this, report}; diff --git a/packages/yarnpkg-doctor/sources/cli.ts b/packages/yarnpkg-doctor/sources/cli.ts index 9736625a7cbf..98bcd500dd7a 100644 --- a/packages/yarnpkg-doctor/sources/cli.ts +++ b/packages/yarnpkg-doctor/sources/cli.ts @@ -249,7 +249,7 @@ async function makeResolveFn(project: Project) { const checksums = project.storedChecksums; const yarnReport = new ThrowReport(); - const fetchOptions: FetchOptions = {project, fetcher, cache, checksums, report: yarnReport, cacheOptions: {skipIntegrityCheck: true}, skipIntegrityCheck: true}; + const fetchOptions: FetchOptions = {project, fetcher, cache, checksums, report: yarnReport, cacheOptions: {skipIntegrityCheck: true}}; const resolveOptions: ResolveOptions = {...fetchOptions, resolver, fetchOptions}; return async (descriptor: Descriptor) => {