| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Update 2023-08-20-bun.mdx | 1 年前 | |
chore: replace lodash with es-toolkit (#6502) ## What's the problem this PR addresses? es-toolkit is a modern lodash alternative that claims to be much faster and lighter, potentially improving Yarn overall performance: https://es-toolkit.slash.page/intro.html ## How did you fix it? The lazy way, frankly: using es-toolkit/compat to provide practically drop-in lodash replacement with minimal effort. ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. --------- Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com> | 1 年前 | |
docs: remove peerDependencies from catalog supported fields (#7230) The docs list `peerDependencies` as supported for `catalog:`, but it isn't yet: it resolves to `*` (see #6925, fix proposed in #6926). Removing it from the list until that lands. | 2 个月前 | |
Fix resolveExports thrown error (#6782) ## What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> Closes https://github.com/yarnpkg/berry/issues/5958 ## How did you fix it? <!-- A detailed description of your implementation. --> Correctly handle the thrown error ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [ ] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [ ] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [ ] I will check that all automated PR checks pass before the PR gets reviewed. Co-authored-by: Maël Nison <nison.mael@gmail.com> | 1 年前 | |
Docs: fix catalog schema (#7220) <!-- IMPORTANT: While Yarn 4.x is still actively developed we're now focusing work on our next major releases (5.x and 6.x). These sister releases use the same pattern as TypeScript-Go: - 5.x will only contain a handful of breaking changes to provide a safe migration path. - 6.x will be the "true" release, notable for being implemented in Rust and including a significantly improved core. While PRs can still be opened against 4.x, we recommend power users to try Yarn 6.x now and help us get it over the finish line. It uses the same testsuite as Berry, so compatibility should be at its best. To check out the working trunk for Yarn 6.x, please refer to this repository: https://github.com/yarnpkg/zpm --> ## What's the problem this PR addresses? The website build is failing because the component library we use cannot handle `_exampleKeys` without `patternProperties` in `catalog` and `catalogs` properties in the yarnrc schema ... ## How did you fix it? Added `patternProperties` to `catalog` and `catalogs` ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. Co-authored-by: Maël Nison <nison.mael@gmail.com> | 2 个月前 | |
Fix JSON Schema (#6973) ## What's the problem this PR addresses? `"type": "mixed"` is not valid JSON Schema. This results in errors in features such as VS Code's automatic validation: ``` Schema 'Yarn Config (.yarnrc.yml) - Yarnrc configuration files (yarnrc.json)' is not valid: /properties/httpTimeout/type : must be equal to one of the allowed values /properties/httpTimeout/type : must be array /properties/httpTimeout/type : must match a schema in anyOfYAML(768) ``` Resolves #6972 ## How did you fix it? `type` could be omitted completely (it's redundant with `oneOf`) but is required by the Docusaurus configuration (via https://github.com/arcanis/react-json-doc?), so I added it as an array. To prevent further regressions, I added validation of the JSON Schemas using [AJV](https://ajv.js.org/). If there's a better place for this test to reside, please let me know. ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. | 10 个月前 | |
Migrate docs to Docusaurus v3 (#6133) **What's the problem this PR addresses?** <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> The docs website is on Docsaurus v2 which is not the latest major version Closes #5918 Closes #6153 **How did you fix it?** <!-- A detailed description of your implementation. --> Migrate to Docsaurus v3. There are other improvements to the build process and website I'd like to make, but I have left them out and kept most of the logic intact since the migration is quite a large undertaking already. **Checklist** <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. | 2 年前 | |
Migrate docs to Docusaurus v3 (#6133) **What's the problem this PR addresses?** <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> The docs website is on Docsaurus v2 which is not the latest major version Closes #5918 Closes #6153 **How did you fix it?** <!-- A detailed description of your implementation. --> Migrate to Docsaurus v3. There are other improvements to the build process and website I'd like to make, but I have left them out and kept most of the logic intact since the migration is quite a large undertaking already. **Checklist** <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. | 2 年前 | |
Docusaurus: Update Docusaurus to 3.7 (#6777) ## What's the problem this PR addresses? The Docusaurus version we use is not the latest ## How did you fix it? Upgrades Docusuaurs to 3.7 and start using the new features: - Also upgrade `docusaurus-plugin-typedoc-api` for compatibility - `docusaurus-plugin-typedoc-api` is unmaintined now. Maybe we should make our custom solution eventually? - Upgrade React to v19 since Docusuaurs 3.7 supports it now - Also upgrades other libraries for official compatibility with React 19, which, while maybe not strictly necessary (nothing seems to break without those upgrades), is nice to get out of the way - Upgrade `xterm` so the website can be built with Node 22 - Bump the Netlify build to Node 22, as Node 18 will be EOL this week. - Add truncation of blog posts on the main blog feed (recommended by Docusaurus) - Add author social links to blog posts (@arcanis I just copied the socials from your website, expect replacing Twitter with BlueSky and adding the website itself. Please review if there are changes you'd like to make) - Remove the extraneous dependencies that [weren't removed](https://github.com/yarnpkg/berry/pull/6264#issuecomment-2097246182) in #6264. - Now I'm pretty sure `markdown-it-br` and `marked-base-url` is actually usused - Even if we are to rebuild the sherlock playground, I feel like there are better libraries for that then `@codesandbox/sandpack-react`. Even if we use `@codesandbox/sandpack-react` again we'd probably use the latest version which is a semver-major bump so there will be churn either way. - Minor fixes like fixing backgrounds I have done some visual comparison testing to verify there aren't unexpected visual changes (on the pages I checked at least) ---- Questions: - Docusaurus's perf logger now records memory usage. Maybe we should turn that on on Netlify? - Do we want to start migrating to `compressionLevel: 0` (the default since 4.0)? This PR replaces ~300 deps (out of ~2,100) so I feel like that's a good time to do so *if* we are to migrate ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. | 1 年前 | |
Docusaurus: Update Docusaurus to 3.7 (#6777) ## What's the problem this PR addresses? The Docusaurus version we use is not the latest ## How did you fix it? Upgrades Docusuaurs to 3.7 and start using the new features: - Also upgrade `docusaurus-plugin-typedoc-api` for compatibility - `docusaurus-plugin-typedoc-api` is unmaintined now. Maybe we should make our custom solution eventually? - Upgrade React to v19 since Docusuaurs 3.7 supports it now - Also upgrades other libraries for official compatibility with React 19, which, while maybe not strictly necessary (nothing seems to break without those upgrades), is nice to get out of the way - Upgrade `xterm` so the website can be built with Node 22 - Bump the Netlify build to Node 22, as Node 18 will be EOL this week. - Add truncation of blog posts on the main blog feed (recommended by Docusaurus) - Add author social links to blog posts (@arcanis I just copied the socials from your website, expect replacing Twitter with BlueSky and adding the website itself. Please review if there are changes you'd like to make) - Remove the extraneous dependencies that [weren't removed](https://github.com/yarnpkg/berry/pull/6264#issuecomment-2097246182) in #6264. - Now I'm pretty sure `markdown-it-br` and `marked-base-url` is actually usused - Even if we are to rebuild the sherlock playground, I feel like there are better libraries for that then `@codesandbox/sandpack-react`. Even if we use `@codesandbox/sandpack-react` again we'd probably use the latest version which is a semver-major bump so there will be churn either way. - Minor fixes like fixing backgrounds I have done some visual comparison testing to verify there aren't unexpected visual changes (on the pages I checked at least) ---- Questions: - Docusaurus's perf logger now records memory usage. Maybe we should turn that on on Netlify? - Do we want to start migrating to `compressionLevel: 0` (the default since 4.0)? This PR replaces ~300 deps (out of ~2,100) so I feel like that's a good time to do so *if* we are to migrate ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. | 1 年前 | |
Version: Reimplement `yarn version` and `yarn version apply` (#7218) <!-- IMPORTANT: While Yarn 4.x is still actively developed we're now focusing work on our next major releases (5.x and 6.x). These sister releases use the same pattern as TypeScript-Go: - 5.x will only contain a handful of breaking changes to provide a safe migration path. - 6.x will be the "true" release, notable for being implemented in Rust and including a significantly improved core. While PRs can still be opened against 4.x, we recommend power users to try Yarn 6.x now and help us get it over the finish line. It uses the same testsuite as Berry, so compatibility should be at its best. To check out the working trunk for Yarn 6.x, please refer to this repository: https://github.com/yarnpkg/zpm --> ## What's the problem this PR addresses? The `yarn version` family of commands has a number of unintuitive behaviors. The most prominent ones are: - Immediate mode in a git repo requires history because it is implemented as a `yarn version --deferred` + `yarn version apply` - For dealing with prereleases, it uses a relatively less-known `stableVersion` field in addition to the `version` field which interacts unintuitively with some workflows. In particular, deferring a semver strategy resolves a named strategy against `version`, which `yarn version apply` applies to `stableVersion` Fixes #3868 Fixes #4014 Fixes #4328 Fixes #5224 Fixes #6810 Fixes #6857 Fixes #6860 Fixes #6970 Fixes #7025 Closes #7110 (supercedes) ## How did you fix it? Reimplemented the `yarn version` and `yarn version apply` commands. Now the bumping logic resides in `yarn version --immediate`. Instead of `yarn version --immediate` being implemented as `yarn version --deferred` + `yarn version apply`, now `yarn version apply` is implemented as `yarn version --immediate decline`. This alleviates the git history requirement of `yarn version --immediate` The prerelease bumping logic is also refactored to be more predictable and can be calculated from a single version, without relying on storing an additional `stableVersion`. Simply put, if the current version is `1.2.0-3`, `prepatch` and `preminor` both bump it to `1.2.0-4` and `premajor` bump it to `2.0.0-0`. `prerelease` is effectively same as `prepatch`. Now that `stableVersion` is not needed, `yarn version --immediate` and `yarn version apply` will remove them from any bumped workspaces. (Our own release pipeline also writes the `stableVersion` field but I don't know if there is a purpose. So I have left them alone for now) The `--prerelease` flag also have some bug fixed. For example, when applying a `prerelease` bump to `1.2.3-alpha.1` with prerelease pattern `beta.%n`, you'd end up with `1.2.3-alpha.1-beta.1`... Also, given how easily "bumping" to a version lower than the current one can happen accidentally due to how prereleases work, there is also now a check to stop that and a `--force` flag to suppress that check. The command documentation has been rewritten and many tests have been added to rigorously document these behavior. ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. --------- Co-authored-by: Maël Nison <nison.mael@gmail.com> | 2 个月前 | |
Minor tweaks to website (#6264) ## What's the problem this PR addresses? Some minor/nitpick-level problems with the website Note: This PR has *some* overlap with #6218. I'll rebase one when the other is merged ## How did you fix it? - Removed remnants of TypeScript misconfiguration created when first adding the docusaurus workspace via `create-docusaurus` - Reorganized the directory structure of the docusaurus workspace. In particular, moved stuff that is run in build-time (except the `docusaurus.config.ts` itself) to a `config` directory. May not seem like much but as more stuff gets added this can keep thing clean and manageable. - Used admonitions instead of plain text where appropriate - Made the remark plugins apply to the CHANGELOG (they weren't before) - Cleaned up and reorganized the dependencies. Of course there are different schools of philosophy regarding what should count as a dependency vs devDependency in a frontend app. Ultimately I decided for Docusaurus, it makes more sense to say everything needed to run `yarn build` successfully is a dep and devDeps are those that are purely for DX (e.g. types) - Removed babel and browserslist config as we are not using them at all ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed. | 2 年前 |
Website
This website is built using Docusaurus, a modern static website generator.
Development
$ yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
$ yarn build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployment
The master branch is automatically deployed to https://yarnpkg.com/ via Netlify. Pull Requests are also deployed as Deploy Previews.