From 2a56d28862d23071124315c468a59711832f118d Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Mon, 2 Sep 2024 07:15:08 +1000 Subject: [PATCH 1/3] Fix typos --- CHANGELOG.md | 10 +++++----- GOVERNANCE.md | 2 +- .../sources/commands/npm/whoami.test.js | 2 +- .../sources/commands/version.test.ts | 6 +++--- .../pkg-tests-specs/sources/dragon.test.js | 8 ++++---- .../sources/features/resolutionCache.test.ts | 2 +- .../pkg-tests-specs/sources/node-modules.test.ts | 2 +- .../sources/protocols/portals.test.js | 4 ++-- .../docusaurus/blog/2020-11-30-release-2.4.mdx | 4 ++-- .../docusaurus/blog/2021-09-25-release-3.1.mdx | 2 +- .../docusaurus/blog/2022-02-21-release-3.2.mdx | 2 +- .../docusaurus/docs/advanced/03-pnp/pnp-spec.mdx | 2 +- .../docs/getting-started/extra/corepack.mdx | 2 +- .../extra/questions-and-answers.mdx | 2 +- .../docs/getting-started/migrating/pnp.mdx | 2 +- packages/docusaurus/src/components/StarrySky.tsx | 16 ++++++++-------- .../docusaurus/static/configuration/yarnrc.json | 2 +- .../extra/resolve/normalize-options.js | 2 +- .../plugin-essentials/sources/commands/add.ts | 2 +- packages/plugin-exec/README.md | 2 +- .../plugin-git/sources/hosted-git-info-parse.ts | 2 +- packages/plugin-git/sources/index.ts | 2 +- packages/plugin-nm/sources/NodeModulesLinker.ts | 10 +++++----- .../sources/commands/npm/whoami.ts | 2 +- packages/plugin-pack/sources/packUtils.ts | 6 +++--- packages/plugin-patch/LICENSE | 2 +- packages/plugin-pnpm/sources/PnpmLinker.ts | 2 +- packages/plugin-typescript/sources/index.ts | 2 +- packages/plugin-version/sources/versionUtils.ts | 2 +- packages/yarnpkg-core/sources/Cache.ts | 2 +- packages/yarnpkg-core/sources/Fetcher.ts | 4 ++-- packages/yarnpkg-core/sources/Project.ts | 4 ++-- packages/yarnpkg-core/sources/Resolver.ts | 2 +- packages/yarnpkg-core/sources/formatUtils.ts | 2 +- packages/yarnpkg-core/sources/httpUtils.ts | 6 +++--- packages/yarnpkg-core/sources/nodeUtils.ts | 2 +- packages/yarnpkg-core/sources/scriptUtils.ts | 2 +- packages/yarnpkg-core/sources/structUtils.ts | 2 +- packages/yarnpkg-core/sources/types.ts | 2 +- packages/yarnpkg-doctor/README.md | 2 +- packages/yarnpkg-fslib/README.md | 2 +- packages/yarnpkg-fslib/sources/FakeFS.ts | 2 +- packages/yarnpkg-fslib/sources/NodeFS.ts | 4 ++-- .../sources/algorithms/copyPromise.ts | 2 +- .../sources/components/ScrollableItems.tsx | 2 +- .../yarnpkg-nm/sources/buildNodeModulesTree.ts | 6 +++--- packages/yarnpkg-nm/sources/hoist.ts | 8 ++++---- packages/yarnpkg-nm/tests/hoist.test.ts | 2 +- packages/yarnpkg-parsers/tests/shell.test.ts | 2 +- packages/yarnpkg-pnp/sources/loader/makeApi.ts | 2 +- .../sources/resolveNodeModulesPath.ts | 8 ++++---- packages/yarnpkg-shell/sources/index.ts | 2 +- tips.json | 2 +- 53 files changed, 90 insertions(+), 90 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e96b54ffe13..37f8257056ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,7 +95,7 @@ The following changes only affect people writing Yarn plugins: - Similarly, the descriptors returned by `Resolve#getResolutionDependencies` are now expected to be the result of `Configuration#normalizeDependency` calls. - - Note that this only applies to the `dependencies` field; the `peerDependencies` field is unchanged, as it must only contains semver ranges without any protocol (with an exception for `workspace:`, but that's not relevant here). + - Note that this only applies to the `dependencies` field; the `peerDependencies` field is unchanged, as it must only contain semver ranges without any protocol (with an exception for `workspace:`, but that's not relevant here). - The `Resolve#getResolutionDependencies` function must now return an object of arbitrary string keys and descriptor values (instead of a map with `DescriptorHash` keys). Those descriptors will be resolved and assigned to the same keys as the initial object. This change allows resolvers to wrap resolution dependencies from other resolvers, which wasn't possible before since it'd have caused the key to change. @@ -610,7 +610,7 @@ yarn set version 2.3.0 The following changes only apply to the `pnp` linker (which is the default install strategy): - The `pnpapi` module now exposes a new function called `getAllLocators` allow you to access the list of all locators in the map without having to traverse the dependency tree. This method is considered a Yarn extension, so you should check for its existence if you plan to use it in your code. -- When using a portal to a package that had peer dependencies, Yarn would loose the information required to resolve those peer dependencies. It will now properly resolve them the same way as all other packages in the dependency tree. +- When using a portal to a package that had peer dependencies, Yarn would lose the information required to resolve those peer dependencies. It will now properly resolve them the same way as all other packages in the dependency tree. The following changes only apply to the `node-modules` linker: @@ -706,7 +706,7 @@ yarn set version 2.1.0 ### Ecosystem -- Packages can now declare they they *need* to be unpacked in order to be functional using the new `"preferUnplugged": true` field in the manifest. This will hurt the experience of your users (your project will be the only one that will require hard installs), so please refrain using this field unless there's no other choice. +- Packages can now declare that they *need* to be unpacked in order to be functional using the new `"preferUnplugged": true` field in the manifest. This will hurt the experience of your users (your project will be the only one that will require hard installs), so please refrain using this field unless there's no other choice. ### New commands @@ -852,9 +852,9 @@ To see a comprehensive documentation about each possible field, please check our - The `dependenciesMeta[].comment` field is expected to be a string field. Even though it isn't actually used anywhere at the moment, we suggest you to write comments regarding the reason why some packages are used here rather than anywhere else. This might prove useful for plugin authors. - - The `dependenciesMeta[].built` field is a boolean flag; setting it to `false` will cause the package manager to ignore this package when considering the list of packages that need to be built. If the project uses `enable-scripts: false`, the warning that would have traditionally been emitted will be downgraded into a simple notice. This settings is project-wide. + - The `dependenciesMeta[].built` field is a boolean flag; setting it to `false` will cause the package manager to ignore this package when considering the list of packages that need to be built. If the project uses `enable-scripts: false`, the warning that would have traditionally been emitted will be downgraded into a simple notice. This setting is project-wide. - - The `peerDependenciesMeta[].optional` field is a boolean flag; setting it to `true` will stop the package manager from emitting a warning when the specified peer dependency is missing (you typically want to use it if you provide optional integrations with specific third-party packages and don't want to pollute your users' installs with a bunch of irrelevant warnings). This settings is package-specific. + - The `peerDependenciesMeta[].optional` field is a boolean flag; setting it to `true` will stop the package manager from emitting a warning when the specified peer dependency is missing (you typically want to use it if you provide optional integrations with specific third-party packages and don't want to pollute your users' installs with a bunch of irrelevant warnings). This setting is package-specific. - The `resolutions` field no longer support the glob syntax within its patterns, as it was redundant with its own glob-less syntax and caused unnecessary confusion. diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 9e081f28cd74..713aa26672ed 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -35,7 +35,7 @@ Stewards establish the project vision, have a full control over the code and its - Define project direction and planning - Ability to decide on moderation decisions -In the event a steward becomes incapacitated, they are expected to leave keys to a trustee that will transmit the rights to an new steward appointed by the core contributors through a vote. +In the event a steward becomes incapacitated, they are expected to leave keys to a trustee that will transmit the rights to a new steward appointed by the core contributors through a vote. #### Induction diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/commands/npm/whoami.test.js b/packages/acceptance-tests/pkg-tests-specs/sources/commands/npm/whoami.test.js index a58c5297cd87..5f48c2de743c 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/commands/npm/whoami.test.js +++ b/packages/acceptance-tests/pkg-tests-specs/sources/commands/npm/whoami.test.js @@ -98,7 +98,7 @@ describe(`Commands`, () => { ); test( - `it should thow an error when invalid auth config is found for a scope`, + `it should throw an error when invalid auth config is found for a scope`, makeTemporaryEnv({}, async ({path, run, source}) => { const url = await startPackageServer(); diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/commands/version.test.ts b/packages/acceptance-tests/pkg-tests-specs/sources/commands/version.test.ts index f9c0825e78e5..11fc292753ea 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/commands/version.test.ts +++ b/packages/acceptance-tests/pkg-tests-specs/sources/commands/version.test.ts @@ -99,7 +99,7 @@ describe(`Commands`, () => { ); test( - `it shouldn't immediatly increase the version number for a workspace when using --deferred`, + `it shouldn't immediately increase the version number for a workspace when using --deferred`, makeTemporaryEnv({ version: `0.0.0`, }, async ({path, run, source}) => { @@ -118,7 +118,7 @@ describe(`Commands`, () => { ); test( - `it shouldn't immediatly increase the version number for a workspace when using preferDeferredVersions`, + `it shouldn't immediately increase the version number for a workspace when using preferDeferredVersions`, makeTemporaryEnv({ version: `0.0.0`, }, { @@ -139,7 +139,7 @@ describe(`Commands`, () => { ); test( - `it should immediatly increase the version number for a workspace when using --immediate, even if preferDeferredVersions is set`, + `it should immediately increase the version number for a workspace when using --immediate, even if preferDeferredVersions is set`, makeTemporaryEnv({ version: `0.0.0`, }, { diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/dragon.test.js b/packages/acceptance-tests/pkg-tests-specs/sources/dragon.test.js index beb74f281ef0..63450d2d239b 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/dragon.test.js +++ b/packages/acceptance-tests/pkg-tests-specs/sources/dragon.test.js @@ -80,7 +80,7 @@ describe(`Dragon tests`, () => { // // A problem is when B also has peer dependencies, like in the setup described // above. In this case, the Yarn implementation of PnP needs to generate a virtual - // package for B (in order to deambiguate the dependencies), and register it while + // package for B (in order to disambiguate the dependencies), and register it while // processing A. Then later, when iterating over B, it is possible that the // workspace registration overwrites the previously registered virtual dependency, // making it unavailable whilst still being referenced in the dependencies of A. @@ -154,7 +154,7 @@ describe(`Dragon tests`, () => { async ({path, run, source}) => { // This test assume that we have a workspace that has a dependency listed in both its // peer dependencies and its dev dependencies, and that it itself has a peer - // depencency. In those circumstances, we've had issues where the peer dependency + // dependency. In those circumstances, we've had issues where the peer dependency // wasn't being properly resolved. await xfs.mkdirpPromise(`${path}/my-workspace`); @@ -235,7 +235,7 @@ describe(`Dragon tests`, () => { // depends on X which has a peer dependency, so we virtualize X and // modify A to point to this new package instead of the original X. // Then once we traverse B we check the dependencies of A, but by - // this time they have already been modified, leading to a boggus + // this time they have already been modified, leading to a bogus // install. await xfs.mkdirpPromise(`${path}/packages/a`); @@ -580,7 +580,7 @@ describe(`Dragon tests`, () => { // Make sure that both the root and dragon-test-11-b have access to the same instance. // This is only possible with the PnP and pnpm linkers. - // The node-modules linker can't fullfil these requirements for aliased packages, + // The node-modules linker can't fulfil these requirements for aliased packages, // without resorting to symlinks and a layout resembling pnpm for aliased dependencies, // which will be too different from the classic node_modules layout for all the other dependencies. await expect(source(` diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/features/resolutionCache.test.ts b/packages/acceptance-tests/pkg-tests-specs/sources/features/resolutionCache.test.ts index 52d914b7df4e..d15f027e4916 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/features/resolutionCache.test.ts +++ b/packages/acceptance-tests/pkg-tests-specs/sources/features/resolutionCache.test.ts @@ -43,7 +43,7 @@ describe(`Features`, () => { // Now, we need a way to force the resolution cache to be used before resolving // a version that it isn't aware of. To that end, we create a package.json with // a dependency on one-fixed-dep@2, and we run 'yarn add no-dep@1.0.0'. This - // ensure that Yarn will run getCandidate on no-deps@1.0.0 first (because it's + // ensures that Yarn will run getCandidate on no-deps@1.0.0 first (because it's // required before adding it to the package.json), and no-deps@2.0.0 later. await xfs.writeFilePromise(ppath.join(path, Filename.manifest), JSON.stringify({ diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/node-modules.test.ts b/packages/acceptance-tests/pkg-tests-specs/sources/node-modules.test.ts index 90e10566c18b..7e5ef2d4b37a 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/node-modules.test.ts +++ b/packages/acceptance-tests/pkg-tests-specs/sources/node-modules.test.ts @@ -708,7 +708,7 @@ describe(`Node_Modules`, () => { test(`should support dependencies hoist border`, // . -> workspace -> dep1 -> dep2 -> dep3 - // should be hoised to: + // should be hoisted to: // . -> workspace -> dep1 -> dep2 // -> dep3 makeTemporaryEnv( diff --git a/packages/acceptance-tests/pkg-tests-specs/sources/protocols/portals.test.js b/packages/acceptance-tests/pkg-tests-specs/sources/protocols/portals.test.js index a900637dfe25..6df8310075b4 100644 --- a/packages/acceptance-tests/pkg-tests-specs/sources/protocols/portals.test.js +++ b/packages/acceptance-tests/pkg-tests-specs/sources/protocols/portals.test.js @@ -44,7 +44,7 @@ describe(`Protocols`, () => { ); test( - `it should allow portals to access their peer dependencies (single occurence)`, + `it should allow portals to access their peer dependencies (single occurrence)`, makeTemporaryEnv({ dependencies: { [`no-deps`]: `1.0.0`, @@ -67,7 +67,7 @@ describe(`Protocols`, () => { ); test( - `it should allow portals to access their peer dependencies (multiple occurences)`, + `it should allow portals to access their peer dependencies (multiple occurrences)`, makeTemporaryEnv({ dependencies: { [`provides-peer-deps-1-0-0`]: `file:./provides-peer-deps-1-0-0`, diff --git a/packages/docusaurus/blog/2020-11-30-release-2.4.mdx b/packages/docusaurus/blog/2020-11-30-release-2.4.mdx index 0bfb558b34d9..ea310eb10bdc 100644 --- a/packages/docusaurus/blog/2020-11-30-release-2.4.mdx +++ b/packages/docusaurus/blog/2020-11-30-release-2.4.mdx @@ -12,7 +12,7 @@ We'll try to reference external plugins made by our community in our release not For now, let me present those two: -- [yarn.build](https://yarn.build/) by [ojkelly](https://twitter.com/ojkelly) is a fast monorepo builder for Yarn. In a sense it's similar to [`yarn workspaces foreach`](https://yarnpkg.com/cli/workspaces/foreach) but more opinionated, and thus easier to adapt to existing workflows. It parallelises builds, shows what's being executed, and generates zipped archives suitable for AWS and similar platforms. +- [yarn.build](https://yarn.build/) by [ojkelly](https://twitter.com/ojkelly) is a fast monorepo builder for Yarn. In a sense it's similar to [`yarn workspaces foreach`](https://yarnpkg.com/cli/workspaces/foreach) but more opinionated, and thus easier to adapt to existing workflows. It parallelizes builds, shows what's being executed, and generates zipped archives suitable for AWS and similar platforms. - [prod-install](https://gitlab.com/Larry1123/yarn-contrib/-/tree/master/packages/plugin-production-install) by [Larry1123](https://gitlab.com/Larry1123) and [NETSVS](https://www.mynetsvs.com/) is a much more powerful version of [`yarn workspaces focus`](https://yarnpkg.com/cli/workspaces/focus) that copies the selected workspaces into a target location before transforming it to become self-sufficient - the final directory thus being ready to be efficiently cached and deployed via Docker layers. @@ -26,7 +26,7 @@ We've also significantly improved the output to be more in line with the rest of ![image](https://user-images.githubusercontent.com/1037931/100546031-5ee0ba00-325f-11eb-8d6d-c6973571e099.png) -This new output is compatible with the `--json` flag, meaning that you can leverage the information obtained from `yarn npm audit --json` from any script you want - even the command-line itself, using tools like [jq](https://stedolan.github.io/jq/)! +This new output is compatible with the `--json` flag, meaning that you can leverage the information obtained from `yarn npm audit --json` from any script you want - even the command-line itself, using tools like [jq](https://stedolan.github.io/jq/)! ## Better Warnings diff --git a/packages/docusaurus/blog/2021-09-25-release-3.1.mdx b/packages/docusaurus/blog/2021-09-25-release-3.1.mdx index ae9b702e7694..da69f9524764 100644 --- a/packages/docusaurus/blog/2021-09-25-release-3.1.mdx +++ b/packages/docusaurus/blog/2021-09-25-release-3.1.mdx @@ -84,7 +84,7 @@ yarn workspaces foreach --since run eslint . yarn workspaces list --since ``` -The `--since` flag also accepts an optional argument (`--since=${commit-ish}`) to manually define a source from which the changes should be derived. +The `--since` flag also accepts an optional argument (`--since=${commit-ish}`) to manually define a source from which the changes should be derived. ### New Workspace Syntax: `workspace:^` diff --git a/packages/docusaurus/blog/2022-02-21-release-3.2.mdx b/packages/docusaurus/blog/2022-02-21-release-3.2.mdx index fa3b27572bcd..84107fb62534 100644 --- a/packages/docusaurus/blog/2022-02-21-release-3.2.mdx +++ b/packages/docusaurus/blog/2022-02-21-release-3.2.mdx @@ -40,7 +40,7 @@ Every version we look for little UI annoyances to fix. This time is no exception - Errors thrown when cloning Git repositories were previously reported as regular stack traces. They will now have dedicated output. -![Improved Git Error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4zkw674viqnuqc7c8fr.png) +![Improved Git Error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4zkw674viqnuqc7c8fr.png) ## Next Major diff --git a/packages/docusaurus/docs/advanced/03-pnp/pnp-spec.mdx b/packages/docusaurus/docs/advanced/03-pnp/pnp-spec.mdx index db9e6b00b9ec..c52517e394d2 100644 --- a/packages/docusaurus/docs/advanced/03-pnp/pnp-spec.mdx +++ b/packages/docusaurus/docs/advanced/03-pnp/pnp-spec.mdx @@ -46,7 +46,7 @@ All algorithms in this specification assume that paths have been normalized acco For improved compatibility with legacy codebases, Plug'n'Play supports a feature we call "fallback". The fallback triggers when a package makes a resolution request to a dependency it doesn't list in its dependencies. In normal circumstances the resolver would throw, but when the fallback is enabled the resolver should first try to find the dependency packages amongst the dependencies of a set of special packages. If it finds it, it then returns it transparently. -In a sense, the fallback can be seen as a limited and safer form of hoisting. While hoisting allows unconstrainted access through multiple levels of dependencies, the fallback requires to explicitly define a fallback package - usually the top-level one. +In a sense, the fallback can be seen as a limited and safer form of hoisting. While hoisting allows unconstrained access through multiple levels of dependencies, the fallback requires to explicitly define a fallback package - usually the top-level one. ## Package locations diff --git a/packages/docusaurus/docs/getting-started/extra/corepack.mdx b/packages/docusaurus/docs/getting-started/extra/corepack.mdx index d8353b034f49..566a5ac68fc9 100644 --- a/packages/docusaurus/docs/getting-started/extra/corepack.mdx +++ b/packages/docusaurus/docs/getting-started/extra/corepack.mdx @@ -20,7 +20,7 @@ Corepack is marked experimental so we can iterate on its CLI faster, but it's al Corepack is included with all official Node.js releases starting from Node.js 14.19 / 16.9. It's however opt-in for the duration of the experimental stage, so you'll need to run `corepack enable` before it's active. -You can quickly check whether Corepack is enabled by running `yarn exec env | grep COREPACK_ROOT`: if you get a path as output, Corepack is properly installed. If not, something may be messing with how the shims are installed. In that case check the [Troubleshooting](/corepack#troubleshooting) section for advices. +You can quickly check whether Corepack is enabled by running `yarn exec env | grep COREPACK_ROOT`: if you get a path as output, Corepack is properly installed. If not, something may be messing with how the shims are installed. In that case check the [Troubleshooting](/corepack#troubleshooting) section for advice. :::danger Some third-party distributors may not include Corepack by default, in particular if you install Node.js from your system package manager. If that happens, running `npm install -g corepack` before `corepack enable` should do the trick. diff --git a/packages/docusaurus/docs/getting-started/extra/questions-and-answers.mdx b/packages/docusaurus/docs/getting-started/extra/questions-and-answers.mdx index f5a34e4221e2..7f2ae1d54895 100644 --- a/packages/docusaurus/docs/getting-started/extra/questions-and-answers.mdx +++ b/packages/docusaurus/docs/getting-started/extra/questions-and-answers.mdx @@ -130,7 +130,7 @@ Although tempting, this reasoning has a fatal flaw: removing the lockfile from t Of course these points are only part of the problem - the lack of lockfile also means that key state information are missing from the repository. When months later you or your contributors want to make a fix on one of your old projects you might not even be able to *build* it anymore, let alone improve it. -Lockfiles should **always** be kept within the repository. Continuous integration testing **is a good idea**, but should be left to continuous integration systems. For example, Yarn itself runs [daily tests](https://github.com/yarnpkg/berry#current-status) against the latest versions of major open-source frameworks and tools, which allows us to quickly spot any compatibility issue with the newest release, while still being guarateed that every contributor will have a consistent experience working with the project. [Dependabot](https://dependabot.com/#how-it-works) and [Renovate](https://www.whitesourcesoftware.com/free-developer-tools/renovate) are also good tools that track your dependencies updates for you. +Lockfiles should **always** be kept within the repository. Continuous integration testing **is a good idea**, but should be left to continuous integration systems. For example, Yarn itself runs [daily tests](https://github.com/yarnpkg/berry#current-status) against the latest versions of major open-source frameworks and tools, which allows us to quickly spot any compatibility issue with the newest release, while still being guaranteed that every contributor will have a consistent experience working with the project. [Dependabot](https://dependabot.com/#how-it-works) and [Renovate](https://www.whitesourcesoftware.com/free-developer-tools/renovate) are also good tools that track your dependencies updates for you. ## How to share scripts between workspaces? diff --git a/packages/docusaurus/docs/getting-started/migrating/pnp.mdx b/packages/docusaurus/docs/getting-started/migrating/pnp.mdx index 6ec8f9e5a3e2..cf193ea12070 100644 --- a/packages/docusaurus/docs/getting-started/migrating/pnp.mdx +++ b/packages/docusaurus/docs/getting-started/migrating/pnp.mdx @@ -76,7 +76,7 @@ Make sure that `typescript`, `eslint`, `prettier`, ... all dependencies typicall 2. Run `yarn dlx @yarnpkg/sdks vscode` and commit the changes. 3. For TypeScript, don't forget to select [Use Workspace Version](https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-the-workspace-version-of-typescript) in VSCode. -## General Advices +## General Advice ### Fix dependencies with `packageExtensions` diff --git a/packages/docusaurus/src/components/StarrySky.tsx b/packages/docusaurus/src/components/StarrySky.tsx index 9625443cea61..41782af7c781 100644 --- a/packages/docusaurus/src/components/StarrySky.tsx +++ b/packages/docusaurus/src/components/StarrySky.tsx @@ -27,7 +27,7 @@ function getPoint() { return {x, y, z}; } -function getRandomParticelPos(particleCount: number) { +function getRandomParticlePos(particleCount: number) { const arr = new Float32Array(particleCount * 3); for (let i = 0; i < particleCount; i++) { @@ -72,19 +72,19 @@ function installSky(canvas: HTMLCanvasElement) { const camera = new THREE.PerspectiveCamera(fov, aspect, near, far); // Geometry - const geometrys = [ + const geometries = [ new THREE.BufferGeometry(), new THREE.BufferGeometry(), ]; - geometrys[0].setAttribute( + geometries[0].setAttribute( `position`, - new THREE.BufferAttribute(getRandomParticelPos(350 * FACTOR), 3), + new THREE.BufferAttribute(getRandomParticlePos(350 * FACTOR), 3), ); - geometrys[1].setAttribute( + geometries[1].setAttribute( `position`, - new THREE.BufferAttribute(getRandomParticelPos(1500 * FACTOR), 3), + new THREE.BufferAttribute(getRandomParticlePos(1500 * FACTOR), 3), ); const loader = new THREE.TextureLoader(); @@ -107,8 +107,8 @@ function installSky(canvas: HTMLCanvasElement) { const container = new THREE.Object3D(); scene.add(container); - const starsT1 = new THREE.Points(geometrys[0], materials[0]); - const starsT2 = new THREE.Points(geometrys[1], materials[1]); + const starsT1 = new THREE.Points(geometries[0], materials[0]); + const starsT2 = new THREE.Points(geometries[1], materials[1]); container.add(starsT1); container.add(starsT2); diff --git a/packages/docusaurus/static/configuration/yarnrc.json b/packages/docusaurus/static/configuration/yarnrc.json index ca3ef4fdf317..0886031814b4 100644 --- a/packages/docusaurus/static/configuration/yarnrc.json +++ b/packages/docusaurus/static/configuration/yarnrc.json @@ -31,7 +31,7 @@ "_package": "@yarnpkg/core", "type": "string", "title": "Behavior that Yarn should follow when it detects that a cache entry is outdated.", - "description": "Whether or not a cache entry is outdated depends on whether it has been built and checksumed by an earlier release of Yarn, or under a different compression settings. Possible behaviors are:\n\n- If `required-only`, it'll keep using the file as-is, unless the version that generated it was decidedly too old.\n- If `match-spec`, it'll also rebuild the file if the compression level has changed.\n- If `always` (the default), it'll always regenerate the cache files so they use the current cache version.", + "description": "Whether or not a cache entry is outdated depends on whether it has been built and checksummed by an earlier release of Yarn, or under a different compression settings. Possible behaviors are:\n\n- If `required-only`, it'll keep using the file as-is, unless the version that generated it was decidedly too old.\n- If `match-spec`, it'll also rebuild the file if the compression level has changed.\n- If `always` (the default), it'll always regenerate the cache files so they use the current cache version.", "enum": ["required-only", "match-spec", "always"], "default": "always" }, diff --git a/packages/plugin-compat/extra/resolve/normalize-options.js b/packages/plugin-compat/extra/resolve/normalize-options.js index 84a719c050db..fa66d62e4260 100644 --- a/packages/plugin-compat/extra/resolve/normalize-options.js +++ b/packages/plugin-compat/extra/resolve/normalize-options.js @@ -83,7 +83,7 @@ module.exports = function (_, opts) { if (resolution == null) return getNodeModulePaths().concat(originalPaths); - // Stip the local named folder + // Strip the local named folder let nodeModules = path.dirname(resolution.packagePath); // Strip the scope named folder if needed diff --git a/packages/plugin-essentials/sources/commands/add.ts b/packages/plugin-essentials/sources/commands/add.ts index 36f0049268e1..1334e94c4c90 100644 --- a/packages/plugin-essentials/sources/commands/add.ts +++ b/packages/plugin-essentials/sources/commands/add.ts @@ -21,7 +21,7 @@ export default class AddCommand extends BaseCommand { details: ` This command adds a package to the package.json for the nearest workspace. - - If it didn't exist before, the package will by default be added to the regular \`dependencies\` field, but this behavior can be overriden thanks to the \`-D,--dev\` flag (which will cause the dependency to be added to the \`devDependencies\` field instead) and the \`-P,--peer\` flag (which will do the same but for \`peerDependencies\`). + - If it didn't exist before, the package will by default be added to the regular \`dependencies\` field, but this behavior can be overridden thanks to the \`-D,--dev\` flag (which will cause the dependency to be added to the \`devDependencies\` field instead) and the \`-P,--peer\` flag (which will do the same but for \`peerDependencies\`). - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your \`dependencies\` or \`devDependencies\` (it won't ever update \`peerDependencies\`, though). diff --git a/packages/plugin-exec/README.md b/packages/plugin-exec/README.md index b210bd1dd857..b2b9a4378b6a 100644 --- a/packages/plugin-exec/README.md +++ b/packages/plugin-exec/README.md @@ -65,7 +65,7 @@ You're free to do whatever you want inside `execEnv.tempDir` but, at the end of ### Example -Generate an hello world package: +Generate a hello world package: ```ts fs.writeFileSync(path.join(execEnv.buildDir, 'package.json'), JSON.stringify({ diff --git a/packages/plugin-git/sources/hosted-git-info-parse.ts b/packages/plugin-git/sources/hosted-git-info-parse.ts index aafe3453e2aa..b6aec2b1213b 100644 --- a/packages/plugin-git/sources/hosted-git-info-parse.ts +++ b/packages/plugin-git/sources/hosted-git-info-parse.ts @@ -33,7 +33,7 @@ function safeURL(url: string) { // attempt to correct an scp style url so that it will parse with `new URL()` function correctURL(gitURL: string) { // ignore @ that come after the first hash since the denotes the start - // of a committish which can contain @ characters + // of a commit hash which can contain @ characters const firstAt = lastIndexOfBefore(gitURL, `@`, `#`); // ignore colons that come after the hash since that could include colons such as: // git@github.com:user/package-2#semver:^1.0.0 diff --git a/packages/plugin-git/sources/index.ts b/packages/plugin-git/sources/index.ts index 7d5afab95c23..7b5a20b8c1fd 100644 --- a/packages/plugin-git/sources/index.ts +++ b/packages/plugin-git/sources/index.ts @@ -7,7 +7,7 @@ import * as gitUtils from './gitUti export interface Hooks { /** * Called when a Git repository is fetched. If the function returns `null` - * the repository will be cloned and packed; otherwise, it must returns a + * the repository will be cloned and packed; otherwise, it must return a * value compatible with what a fetcher would return. * * The main use case for this hook is to let you implement smarter cloning diff --git a/packages/plugin-nm/sources/NodeModulesLinker.ts b/packages/plugin-nm/sources/NodeModulesLinker.ts index 4c404cfb28d9..5b0eae927b02 100644 --- a/packages/plugin-nm/sources/NodeModulesLinker.ts +++ b/packages/plugin-nm/sources/NodeModulesLinker.ts @@ -20,7 +20,7 @@ const STATE_FILE_VERSION = 1; const NODE_MODULES = `node_modules` as Filename; const DOT_BIN = `.bin` as Filename; const INSTALL_STATE_FILE = `.yarn-state.yml` as Filename; -const MTIME_ACCURANCY = 1000; +const MTIME_ACCURACY = 1000; type InstallState = {locatorMap: NodeModulesLocatorMap, locationTree: LocationTree, binSymlinks: BinSymlinkMap, nmMode: NodeModulesMode, mtimeMs: number}; type BinSymlinkMap = Map>; @@ -471,7 +471,7 @@ async function findInstallState(project: Project, {unrollAliases = false}: {unro const locatorState = parseSyml(await xfs.readFilePromise(installStatePath, `utf8`)); - // If we have a higher serialized version than we can handle, ignore the state alltogether + // If we have a higher serialized version than we can handle, ignore the state altogether if (locatorState.__metadata.version > STATE_FILE_VERSION) return null; @@ -711,19 +711,19 @@ async function copyFilePromise({srcPath, dstPath, entry, globalHardlinksStore, b try { const stats = await xfs.statPromise(contentFilePath); - if (stats && (!entry.mtimeMs || stats.mtimeMs > entry.mtimeMs || stats.mtimeMs < entry.mtimeMs - MTIME_ACCURANCY)) { + if (stats && (!entry.mtimeMs || stats.mtimeMs > entry.mtimeMs || stats.mtimeMs < entry.mtimeMs - MTIME_ACCURACY)) { const contentDigest = await hashUtils.checksumFile(contentFilePath, {baseFs: xfs, algorithm: `sha1`}); if (contentDigest !== entry.digest) { // If file content was modified by the user, or corrupted, we first move it out of the way const tmpPath = ppath.join(globalHardlinksStore, `${crypto.randomBytes(16).toString(`hex`)}.tmp`); await xfs.renamePromise(contentFilePath, tmpPath); - // Then we overwrite the temporary file, thus restorting content of original file in all the linked projects + // Then we overwrite the temporary file, thus restoring content of original file in all the linked projects const content = await baseFs.readFilePromise(srcPath); await xfs.writeFilePromise(tmpPath, content); try { - // Then we try to move content file back on its place, if its still free + // Then we try to move content file back on its place, if it's still free // If we fail here, it means that some other process or thread has created content file // And this is okay, we will end up with two content files, but both with original content, unlucky files will have `.tmp` extension await xfs.linkPromise(tmpPath, contentFilePath); diff --git a/packages/plugin-npm-cli/sources/commands/npm/whoami.ts b/packages/plugin-npm-cli/sources/commands/npm/whoami.ts index a6677a9e25c5..467794e35a7d 100644 --- a/packages/plugin-npm-cli/sources/commands/npm/whoami.ts +++ b/packages/plugin-npm-cli/sources/commands/npm/whoami.ts @@ -16,7 +16,7 @@ export default class NpmWhoamiCommand extends BaseCommand { details: ` Print the username associated with the current authentication settings to the standard output. - When using \`-s,--scope\`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the \`npmRegistries\` map, and the registry associated with the scope is configured via the \`npmScopes\` map). + When using \`-s,--scope\`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overridden using the \`npmRegistries\` map, and the registry associated with the scope is configured via the \`npmScopes\` map). When using \`--publish\`, the registry we'll select will by default be the one used when publishing packages (\`publishConfig.registry\` or \`npmPublishRegistry\` if available, otherwise we'll fallback to the regular \`npmRegistryServer\`). `, diff --git a/packages/plugin-pack/sources/packUtils.ts b/packages/plugin-pack/sources/packUtils.ts index 636bd8c44eb6..638876245159 100644 --- a/packages/plugin-pack/sources/packUtils.ts +++ b/packages/plugin-pack/sources/packUtils.ts @@ -326,12 +326,12 @@ function normalizePattern(pattern: string, {cwd}: {cwd: PortablePath}) { } function addIgnorePattern(target: Array, pattern: string, {cwd}: {cwd: PortablePath}) { - const trimed = pattern.trim(); + const trimmed = pattern.trim(); - if (trimed === `` || trimed[0] === `#`) + if (trimmed === `` || trimmed[0] === `#`) return; - target.push(normalizePattern(trimed, {cwd})); + target.push(normalizePattern(trimmed, {cwd})); } enum MatchType { diff --git a/packages/plugin-patch/LICENSE b/packages/plugin-patch/LICENSE index 0c95d7f55955..95a14011921c 100644 --- a/packages/plugin-patch/LICENSE +++ b/packages/plugin-patch/LICENSE @@ -1,5 +1,5 @@ Original work Copyright (c) 2017 David Sheldrick -Modified work Copyright (c) 2019 Maël Nison +Modified work Copyright (c) 2019 Maël Nison Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/packages/plugin-pnpm/sources/PnpmLinker.ts b/packages/plugin-pnpm/sources/PnpmLinker.ts index 5627b758f5de..d5bffe6e2168 100644 --- a/packages/plugin-pnpm/sources/PnpmLinker.ts +++ b/packages/plugin-pnpm/sources/PnpmLinker.ts @@ -96,7 +96,7 @@ class PnpmInstaller implements Installer { }; attachCustomData(customData: any) { - // We don't want to attach the data because it's only used in the Linker and we'll recompute it anyways in the Installer, + // We don't want to attach the data because it's only used in the Linker and we'll recompute it anyway in the Installer, // it needs to be invalidated because otherwise we'll never prune the store or we might run into various issues. } diff --git a/packages/plugin-typescript/sources/index.ts b/packages/plugin-typescript/sources/index.ts index d3b388023890..371bf8806ae7 100644 --- a/packages/plugin-typescript/sources/index.ts +++ b/packages/plugin-typescript/sources/index.ts @@ -68,7 +68,7 @@ const afterWorkspaceDependencyAddition = async ( const regularDependencyHash = workspace.manifest.dependencies.get(descriptor.identHash)?.descriptorHash; const devDependencyHash = workspace.manifest.devDependencies.get(descriptor.identHash)?.descriptorHash; - // We only want workspaces that depend the exact same range as the original package + // We only want workspaces that depend on the exact same range as the original package if (regularDependencyHash !== descriptor.descriptorHash && devDependencyHash !== descriptor.descriptorHash) return miscUtils.mapAndFind.skip; diff --git a/packages/plugin-version/sources/versionUtils.ts b/packages/plugin-version/sources/versionUtils.ts index 80ee84652419..56ad51d1e53a 100644 --- a/packages/plugin-version/sources/versionUtils.ts +++ b/packages/plugin-version/sources/versionUtils.ts @@ -342,7 +342,7 @@ export function getUndecidedDependentWorkspaces(versionFile: Pick {}); diff --git a/packages/yarnpkg-core/sources/Resolver.ts b/packages/yarnpkg-core/sources/Resolver.ts index 2e857ab20efe..f8838ef11cc1 100644 --- a/packages/yarnpkg-core/sources/Resolver.ts +++ b/packages/yarnpkg-core/sources/Resolver.ts @@ -15,7 +15,7 @@ export type ResolveOptions = MinimalResolveOptions & { /** * Resolvers are the components that do all the lifting needed in order to - * produce a lockfile. In clear, they transfom the following: + * produce a lockfile. In clear, they transform the following: * * webpack@^4.0.0 * diff --git a/packages/yarnpkg-core/sources/formatUtils.ts b/packages/yarnpkg-core/sources/formatUtils.ts index 3482b145ea36..896e899da163 100644 --- a/packages/yarnpkg-core/sources/formatUtils.ts +++ b/packages/yarnpkg-core/sources/formatUtils.ts @@ -500,7 +500,7 @@ export enum LogLevel { } /** - * Add support support for the `logFilters` setting to the specified Report + * Add support for the `logFilters` setting to the specified Report * instance. */ export function addLogFilterSupport(report: Report, {configuration}: {configuration: Configuration}) { diff --git a/packages/yarnpkg-core/sources/httpUtils.ts b/packages/yarnpkg-core/sources/httpUtils.ts index 580241b08468..e723e01ddb3a 100644 --- a/packages/yarnpkg-core/sources/httpUtils.ts +++ b/packages/yarnpkg-core/sources/httpUtils.ts @@ -131,12 +131,12 @@ export function getNetworkSettings(target: string | URL, opts: { configuration: httpsCertFilePath: undefined, }; - const mergableKeys = Object.keys(mergedNetworkSettings) as Array; + const mergeableKeys = Object.keys(mergedNetworkSettings) as Array; const url = typeof target === `string` ? new URL(target) : target; for (const [glob, config] of networkSettings) { if (micromatch.isMatch(url.hostname, glob)) { - for (const key of mergableKeys) { + for (const key of mergeableKeys) { const setting = config.get(key); if (setting !== null && typeof mergedNetworkSettings[key] === `undefined`) { mergedNetworkSettings[key] = setting as any; @@ -146,7 +146,7 @@ export function getNetworkSettings(target: string | URL, opts: { configuration: } // Apply defaults - for (const key of mergableKeys) + for (const key of mergeableKeys) if (typeof mergedNetworkSettings[key] === `undefined`) mergedNetworkSettings[key] = opts.configuration.get(key) as any; diff --git a/packages/yarnpkg-core/sources/nodeUtils.ts b/packages/yarnpkg-core/sources/nodeUtils.ts index 02d2d438e7a2..c9082c93710b 100644 --- a/packages/yarnpkg-core/sources/nodeUtils.ts +++ b/packages/yarnpkg-core/sources/nodeUtils.ts @@ -36,7 +36,7 @@ function getLibc() { header = xfs.readFileSync(LDD_PATH); } catch {} - // Since the getReport can be prohibitely expensive (it also queries DNS which, if misconfigured, can take a long time to timeout), + // Since the getReport can be prohibitively expensive (it also queries DNS which, if misconfigured, can take a long time to timeout), // we first check if the ldd binary is glibc or musl, and only then run the getReport() if we can't determine the libc variant. if (typeof header !== `undefined`) { if (header && (header.includes(`GLIBC`) || header.includes(`libc`))) diff --git a/packages/yarnpkg-core/sources/scriptUtils.ts b/packages/yarnpkg-core/sources/scriptUtils.ts index 2dcd7e59e6db..960a5c27f98b 100644 --- a/packages/yarnpkg-core/sources/scriptUtils.ts +++ b/packages/yarnpkg-core/sources/scriptUtils.ts @@ -309,7 +309,7 @@ export async function prepareExternalProject(cwd: PortablePath, outputPath: Port // read a logfile telling them to open another logfile env.YARN_ENABLE_INLINE_BUILDS = `1`; - // If a lockfile doesn't exist we create a empty one to + // If a lockfile doesn't exist we create an empty one to // prevent the project root detection from thinking it's in an // undeclared workspace when the user has a lockfile in their home // directory on Windows diff --git a/packages/yarnpkg-core/sources/structUtils.ts b/packages/yarnpkg-core/sources/structUtils.ts index 1bf0489639b9..a938881c076d 100644 --- a/packages/yarnpkg-core/sources/structUtils.ts +++ b/packages/yarnpkg-core/sources/structUtils.ts @@ -110,7 +110,7 @@ export function convertPackageToLocator(pkg: Package): Locator { * Deep copies a package then change its locator to something else. * * @param pkg The source package - * @param locator Its new new locator + * @param locator Its new locator */ export function renamePackage(pkg: Package, locator: Locator): Package { return { diff --git a/packages/yarnpkg-core/sources/types.ts b/packages/yarnpkg-core/sources/types.ts index 93ca9696b3e3..0603211a7886 100644 --- a/packages/yarnpkg-core/sources/types.ts +++ b/packages/yarnpkg-core/sources/types.ts @@ -71,7 +71,7 @@ export type LocatorHash = string & { __locatorHash: string }; * Locator are just like idents (including their `identHash`), except that * they also contain a reference and an additional comparator hash. They are * in this regard very similar to descriptors except that each descriptor may - * reference multiple valid candidate packages whereas each locators can only + * reference multiple valid candidate packages whereas each locator can only * reference a single package. * * This interesting property means that each locator can be safely turned into diff --git a/packages/yarnpkg-doctor/README.md b/packages/yarnpkg-doctor/README.md index 6ee7b577cd13..b49c34861ac1 100644 --- a/packages/yarnpkg-doctor/README.md +++ b/packages/yarnpkg-doctor/README.md @@ -71,7 +71,7 @@ Ensures that third party tools (CRA, Next, Vue-cli, etc) resolve their own versi When loaders and plugins are included as strings e.g `loader: 'file-loader'` in a `webpack.config.js` then Webpack will try to resolve it from the point of view of the project root. -If the webpack config is located in a dependency, as with tools such as Create-React-App, Next.js and Gatsby, then Webpack might accidentally use an different hoisted version of a plugin. This can cause various weird bugs and crashes. +If the webpack config is located in a dependency, as with tools such as Create-React-App, Next.js and Gatsby, then Webpack might accidentally use a different hoisted version of a plugin. This can cause various weird bugs and crashes. The third party tool should use `require.resolve('file-loader')` so that Webpack loads the plugin through an absolute path and it will use the loader/plugin it specifies in its own package.json. diff --git a/packages/yarnpkg-fslib/README.md b/packages/yarnpkg-fslib/README.md index a2203f423200..bde1252f89a3 100644 --- a/packages/yarnpkg-fslib/README.md +++ b/packages/yarnpkg-fslib/README.md @@ -4,7 +4,7 @@ A TypeScript library abstracting the Node filesystem APIs. We use it for three m ## Type-safe paths -Our library has two path types, `NativePath` and `PortablePath`. Most interfaces only accept the later, and instances of the former need to be transformed back and forth using our type-safe utilities before being usable. +Our library has two path types, `NativePath` and `PortablePath`. Most interfaces only accept the latter, and instances of the former need to be transformed back and forth using our type-safe utilities before being usable. ## Custom filesystems diff --git a/packages/yarnpkg-fslib/sources/FakeFS.ts b/packages/yarnpkg-fslib/sources/FakeFS.ts index 27ccfc8eebbb..1010d57e1b0b 100644 --- a/packages/yarnpkg-fslib/sources/FakeFS.ts +++ b/packages/yarnpkg-fslib/sources/FakeFS.ts @@ -719,7 +719,7 @@ export abstract class FakeFS

{ } finally { try { // closePromise needs to come before unlinkPromise otherwise another process can attempt - // to get the file handle after the unlink but before close resuling in + // to get the file handle after the unlink but before close resulting in // EPERM: operation not permitted, open await this.closePromise(fd); await this.unlinkPromise(lockPath); diff --git a/packages/yarnpkg-fslib/sources/NodeFS.ts b/packages/yarnpkg-fslib/sources/NodeFS.ts index 91d6699d664b..c0b14ef20351 100644 --- a/packages/yarnpkg-fslib/sources/NodeFS.ts +++ b/packages/yarnpkg-fslib/sources/NodeFS.ts @@ -60,7 +60,7 @@ export class NodeFS extends BasePortableFakeFS { // We need a way to tell TS that the values returned by the `read` // methods are compatible with `Dir`, especially the `name` field. // - // We also can't use `Object.assign` to set the because the `path` + // We also can't use `Object.assign` to set them because the `path` // field to a Filename, because the property isn't writable, so // we need to use defineProperty instead. // @@ -86,7 +86,7 @@ export class NodeFS extends BasePortableFakeFS { // We need a way to tell TS that the values returned by the `read` // methods are compatible with `Dir`, especially the `name` field. // - // We also can't use `Object.assign` to set the because the `path` + // We also can't use `Object.assign` to set them because the `path` // field to a Filename, because the property isn't writable, so // we need to use defineProperty instead. // diff --git a/packages/yarnpkg-fslib/sources/algorithms/copyPromise.ts b/packages/yarnpkg-fslib/sources/algorithms/copyPromise.ts index 327f913b00a1..3f9cb2d4efbb 100644 --- a/packages/yarnpkg-fslib/sources/algorithms/copyPromise.ts +++ b/packages/yarnpkg-fslib/sources/algorithms/copyPromise.ts @@ -241,7 +241,7 @@ async function copyFileViaIndex(prelayout: Ope const content = await sourceFs.readFilePromise(source); await destinationFs.writeFilePromise(tempPath, content); - // We use `linkPromise` rather than `renamePromise` because the later + // We use `linkPromise` rather than `renamePromise` because the latter // overwrites the destination if it already exists; usually this // wouldn't be a problem, but since we care about preserving the // hardlink identity of the destination, we can't do that. diff --git a/packages/yarnpkg-libui/sources/components/ScrollableItems.tsx b/packages/yarnpkg-libui/sources/components/ScrollableItems.tsx index 21fb5e4e9d11..8f462da26184 100644 --- a/packages/yarnpkg-libui/sources/components/ScrollableItems.tsx +++ b/packages/yarnpkg-libui/sources/components/ScrollableItems.tsx @@ -23,7 +23,7 @@ export const ScrollableItems = ({active = true, children = [], radius = 10, size useEffect(() => { // If the active key is missing from the - // new keys, set it to the initalKey + // new keys, set it to the initialKey if (!keys.includes(activeKey)) { setActiveKey(initialKey); } diff --git a/packages/yarnpkg-nm/sources/buildNodeModulesTree.ts b/packages/yarnpkg-nm/sources/buildNodeModulesTree.ts index cd8a1a46946b..1cc8be3feaa6 100644 --- a/packages/yarnpkg-nm/sources/buildNodeModulesTree.ts +++ b/packages/yarnpkg-nm/sources/buildNodeModulesTree.ts @@ -5,7 +5,7 @@ import {PnpApi, PhysicalPackageLocator, PackageInformation, DependencyTarget} fr import {hoist, HoisterTree, HoisterResult, HoisterDependencyKind} from './hoist'; -// Babel doesn't support const enums, thats why we use non-const enum for LinkType in @yarnpkg/pnp +// Babel doesn't support const enums, that's why we use non-const enum for LinkType in @yarnpkg/pnp // But because of this TypeScript requires @yarnpkg/pnp during runtime // To prevent this we redeclare LinkType enum here, to not depend on @yarnpkg/pnp during runtime export enum LinkType { @@ -61,7 +61,7 @@ export interface NodeModulesTreeOptions { const NODE_MODULES = `node_modules` as Filename; /** - * The workspace name suffix used internally by this implementation and appeneded to the name of workspace package. + * The workspace name suffix used internally by this implementation and appended to the name of workspace package. * It is needed to create and distinguuish special nodes for workspaces */ const WORKSPACE_NAME_SUFFIX = `$wsroot$`; @@ -76,7 +76,7 @@ type WorkspaceTree = {workspaceLocator?: PhysicalPackageLocator, children: Map packagePath.indexOf(`.zip/${NODE_MODULES}/`) >= 0 ? diff --git a/packages/yarnpkg-nm/sources/hoist.ts b/packages/yarnpkg-nm/sources/hoist.ts index 556eb04e6b19..cd50584919aa 100644 --- a/packages/yarnpkg-nm/sources/hoist.ts +++ b/packages/yarnpkg-nm/sources/hoist.ts @@ -110,7 +110,7 @@ type InternalHoistOptions = { /** * Hoists package tree. * - * The root node of a tree must has id: '.'. + * The root node of a tree must have id: '.'. * This function does not mutate its arguments, it hoists and returns tree copy. * * @param tree package tree (cycles in the tree are allowed) @@ -371,10 +371,10 @@ const getSortedRegularDependencies = (node: HoisterWorkTree): Set `parent package 1` ... `parent package n` -> `dependency` - * We check wether we can hoist `dependency` to `root package`, this boils down basically + * We check whether we can hoist `dependency` to `root package`, this boils down basically * to checking: - * 1. Wether `root package` does not depend on other version of `dependency` - * 2. Wether all the peer dependencies of a `dependency` had already been hoisted from all `parent packages` + * 1. Whether `root package` does not depend on other version of `dependency` + * 2. Whether all the peer dependencies of a `dependency` had already been hoisted from all `parent packages` * * If many versions of the `dependency` can be hoisted to the `root package` we choose the most used * `dependency` version in the project among them. diff --git a/packages/yarnpkg-nm/tests/hoist.test.ts b/packages/yarnpkg-nm/tests/hoist.test.ts index 2c15dea9c6d9..0d6b2b452284 100644 --- a/packages/yarnpkg-nm/tests/hoist.test.ts +++ b/packages/yarnpkg-nm/tests/hoist.test.ts @@ -83,7 +83,7 @@ describe(`hoist`, () => { // // -> A // // -> B // // -> C - // // but its difficult and its okay if hoister at least doesn't loop and leave the graph in original state + // // but it's difficult and it's okay if hoister at least doesn't loop and leave the graph in original state // const tree = { // '.': {dependencies: [`D`]}, diff --git a/packages/yarnpkg-parsers/tests/shell.test.ts b/packages/yarnpkg-parsers/tests/shell.test.ts index e7781834e7c0..cc8bbeed3d65 100644 --- a/packages/yarnpkg-parsers/tests/shell.test.ts +++ b/packages/yarnpkg-parsers/tests/shell.test.ts @@ -62,7 +62,7 @@ const INVALID_COMMANDS = [ // Bash doesn't allow it, but ZSH and Fish do. We don't, because // we don't need the extra complexity. Also, it's more common to // end a shell line with a semicolon, rather than start one with a semicolon. - // Anyways, I can't think of any reason why anybody would like to start + // Anyway, I can't think of any reason why anybody would like to start // a script with a semicolon. ¯\_(ツ)_/¯. `; echo foo`, diff --git a/packages/yarnpkg-pnp/sources/loader/makeApi.ts b/packages/yarnpkg-pnp/sources/loader/makeApi.ts index dd645bb3b48d..195b2c4c6957 100644 --- a/packages/yarnpkg-pnp/sources/loader/makeApi.ts +++ b/packages/yarnpkg-pnp/sources/loader/makeApi.ts @@ -582,7 +582,7 @@ export function makeApi(runtimeState: RuntimeState, opts: MakeApiOptions): PnpAp if (result === false) { throw makeError( ErrorCode.BUILTIN_NODE_RESOLUTION_FAILED, - `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp)\n\nRequire request: "${requestForDisplay}"\nRequired by: ${issuerForDisplay}\n`, + `The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitly ignored by the regexp)\n\nRequire request: "${requestForDisplay}"\nRequired by: ${issuerForDisplay}\n`, {request: requestForDisplay, issuer: issuerForDisplay}, ); } diff --git a/packages/yarnpkg-pnpify/sources/resolveNodeModulesPath.ts b/packages/yarnpkg-pnpify/sources/resolveNodeModulesPath.ts index fc96164c906e..1a93d8b53f04 100644 --- a/packages/yarnpkg-pnpify/sources/resolveNodeModulesPath.ts +++ b/packages/yarnpkg-pnpify/sources/resolveNodeModulesPath.ts @@ -29,16 +29,16 @@ export interface ResolvedPath { resolvedPath: PortablePath; /** - * This field is returned for pathes ending with `/node_modules[/@scope]`. + * This field is returned for paths ending with `/node_modules[/@scope]`. * - * These pathes are special in the sense they do not exists as physical dirs in PnP projects. + * These paths are special in the sense they do not exist as physical dirs in PnP projects. * - * We emulate these pathes by forwarding to real physical path on underlying fs. + * We emulate these paths by forwarding to real physical path on underlying fs. */ forwardedDirPath?: PortablePath; /** - * Directory entries list, returned for pathes ending with `/node_modules[/@scope]` + * Directory entries list, returned for paths ending with `/node_modules[/@scope]` */ dirList?: Set; diff --git a/packages/yarnpkg-shell/sources/index.ts b/packages/yarnpkg-shell/sources/index.ts index 175448ac6cb3..e2d761d8ae4f 100644 --- a/packages/yarnpkg-shell/sources/index.ts +++ b/packages/yarnpkg-shell/sources/index.ts @@ -783,7 +783,7 @@ async function executeCommandChainImpl(node: CommandChain, opts: ShellOptions, s if (execution === null) throw new Error(`Assertion failed: The execution pipeline should have been setup`); - // Otherwise, depending on the exaxct pipe type, we either pipe stdout + // Otherwise, depending on the exact pipe type, we either pipe stdout // only or stdout and stderr switch (pipeType) { case `|`: { diff --git a/tips.json b/tips.json index b9b0379e3ddd..5dc39f2f3101 100644 --- a/tips.json +++ b/tips.json @@ -19,7 +19,7 @@ }, { "message": "**Did you know?** Package transpilation should be performed in `prepack` and not `prepublish`, which should only do package validation." }, { - "message": "**Did you know?** The `main`, `bin`, `exports`, ... fields can be overriden on publish by their counterparts found in `publishConfig`." + "message": "**Did you know?** The `main`, `bin`, `exports`, ... fields can be overridden on publish by their counterparts found in `publishConfig`." }, { "message": "**Did you know?** The Yarn shell lets you use `$1`, `$2`, and even `$@` in your `scripts` entries." }, { From 094057734be41642eb4eca912e50cb83d1134fad Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Mon, 16 Sep 2024 07:05:53 +1000 Subject: [PATCH 2/3] Restore committish --- packages/plugin-git/sources/hosted-git-info-parse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-git/sources/hosted-git-info-parse.ts b/packages/plugin-git/sources/hosted-git-info-parse.ts index b6aec2b1213b..aafe3453e2aa 100644 --- a/packages/plugin-git/sources/hosted-git-info-parse.ts +++ b/packages/plugin-git/sources/hosted-git-info-parse.ts @@ -33,7 +33,7 @@ function safeURL(url: string) { // attempt to correct an scp style url so that it will parse with `new URL()` function correctURL(gitURL: string) { // ignore @ that come after the first hash since the denotes the start - // of a commit hash which can contain @ characters + // of a committish which can contain @ characters const firstAt = lastIndexOfBefore(gitURL, `@`, `#`); // ignore colons that come after the hash since that could include colons such as: // git@github.com:user/package-2#semver:^1.0.0 From ec807de4d2c7bbea9ce7dbc99019f2b1ad0c638e Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Mon, 16 Sep 2024 16:15:34 +1000 Subject: [PATCH 3/3] Version check --- .yarn/versions/759c2fea.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .yarn/versions/759c2fea.yml diff --git a/.yarn/versions/759c2fea.yml b/.yarn/versions/759c2fea.yml new file mode 100644 index 000000000000..838214d01477 --- /dev/null +++ b/.yarn/versions/759c2fea.yml @@ -0,0 +1,38 @@ +releases: + "@yarnpkg/cli": patch + "@yarnpkg/doctor": patch + "@yarnpkg/fslib": patch + "@yarnpkg/plugin-essentials": patch + "@yarnpkg/plugin-exec": patch + "@yarnpkg/plugin-interactive-tools": patch + "@yarnpkg/plugin-npm-cli": patch + "@yarnpkg/pnp": patch + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-file" + - "@yarnpkg/plugin-git" + - "@yarnpkg/plugin-github" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-link" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm" + - "@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" + - vscode-zipfs + - "@yarnpkg/builder" + - "@yarnpkg/core" + - "@yarnpkg/libui" + - "@yarnpkg/libzip" + - "@yarnpkg/nm" + - "@yarnpkg/pnpify" + - "@yarnpkg/sdks" + - "@yarnpkg/shell"