Skip to content

Conversation

MKruschke
Copy link
Contributor

Changes

  • Read and update catalogs entries from .yarnrc.yml file
  • Ensure that the yarn.lock file is updated to

Context

Support catalogs for yarn via the plugin yarn-plugin-catalogs. See short discussion -> #36928

Note: informed the plugin authors -> toss/yarn-plugin-catalogs#19

Documentation (please check one with an [x])

  • I have updated the documentation

How I've tested my work (please select one)

I have verified these changes via:

@MKruschke MKruschke requested a review from viceice September 15, 2025 08:36
@MKruschke MKruschke requested a review from viceice September 15, 2025 14:52
@MKruschke MKruschke requested a review from viceice September 19, 2025 11:59
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nearly done 🤗

getSiblingFileName,
readLocalFile,
} from '../../../../util/fs';
import { ensureLocalPath } from '../../../../util/fs/util';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { ensureLocalPath } from '../../../../util/fs/util';

wrong import path anyways

@MKruschke MKruschke requested a review from viceice September 19, 2025 12:56
@MKruschke MKruschke requested a review from viceice September 20, 2025 05:34
const res = await npmExtract.extractPackageFile(
pJsonStr,
'package.json',
'.yarnrc.yml',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good spot I changed one test to much after the refactoring. Will revert it

catalogs: YarnCatalogs | undefined,
packageFile: string,
hasPackageManager: boolean,
): Promise<PackageFileContent<NpmManagerData> | null> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when is null being returned?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch implementation changed and now it isn't returning it any more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants