profile
viewpoint
Maël Nison arcanis @datadog Paris, France https://twitter.com/arcanis Lead maintainer for @yarnpkg 📦🐈 Senior Software Engineer @Datadog, ex @facebook, @sketchfab, ...

animatedjs/animated 1732

Declarative Animations Library for React and React Native

arcanis/clipanion 174

Type-safe CLI library with no dependencies

arcanis/colibrijs 139

Color extractor

arcanis/build-pnm 2

Generate package-name-maps files by consuming the PnP API

arcanis/chenille 1

Keep master green at all times

arcanis/algoliasearch-helper-js 0

Helper for implementing advanced search features with Algolia

arcanis/align 0

Abstract React Align

issue commentyarnpkg/berry

[Feature] Configure coc.nvim plugins with pnpify --sdk

Duplicate of #1231 but you ticked the first box so we can leave it open 😄

It's a good idea. The way I could see it work:

  • On new projects, yarn dlx @yarnpkg/pnpify --sdk will just create the vscode SDK
  • Additional SDKs can be added with yarn dlx @yarnpkg/pnpify --sdk=vim|atom|...
  • Running yarn dlx @yarnpkg/pnpify --sdk will update all the existing SDKs if found

This way we keep the current behavior by default (which I think makes sense, VSCode is the most popular editor by far right now), but still provide a way for users to add their own at little maintenance costs. Even infra teams just have a single command to run to update all the SDKs at once.

esetnik

comment created time in 7 hours

issue commentmicrosoft/DefinitelyTyped-tools

Q: What would you expect from package managers?

Something I've been thinking lately was that perhaps packages should, as a general rule, simply list all their dependencies - regardless whether they'd be useful or not - and leave it to the package managers to remove the dependencies that don't make sense given the user context. For example, it would be trivial for us to simply ignore all @types dependencies.

The advantage with such an approach is that it's very backward compatible by design: the worse that can happen is that some users download some extra packages on older systems - which is better than not listing dependencies and introducing undefined behaviors.

arcanis

comment created time in 8 hours

issue openedmicrosoft/DefinitelyTyped-tools

Q: What would you expect from package managers?

The @types packages (and particularly whether dependencies should be regular deps or peer deps, big subject) is a bit messy in terms of dependency graph. I was wondering if you had a rough idea what would the absolute best case look like, assuming an ideal world where perfect solutions exist.

For example, would it be peer dependencies everywhere? Regular deps everywhere? A bit of both? Unlisted dependencies? A separate dependency field that package managers would understand (typedDependencies or whatever)? No more @types package and .d.ts into every package? The package manager downloading the types without needing markup?

Even as a thought experiment I think it can be interesting to hear your opinion about "split ecosystems" such as what TypeScript users experience.

created time in 4 months

pull request commentyarnpkg/berry

support --inspect and --inspect-brk string variants

Thanks!

esetnik

comment created time in 10 hours

push eventyarnpkg/berry

Ethan Setnik

commit sha 13da595247a4d8f34ac1827976717f3e5256fd82

support --inspect and --inspect-brk string variants (#1437) * support --inspect and --inspect-brk string variants * fix typo * add versions * Update 02af6d8d.yml * Versions * Format Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 10 hours

PR merged yarnpkg/berry

support --inspect and --inspect-brk string variants

What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) --> Resolves #1436 #1358 ...

How did you fix it? Handle both boolean and string type for --inspect and --inspect-brk ...

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. -->

<!-- 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 have verified that all automated PR checks pass.
+40 -8

1 comment

2 changed files

esetnik

pr closed time in 10 hours

issue closedyarnpkg/berry

[Feature] - --inspect host port mapping

  • [x] I'd be willing to implement this feature
  • [ ] This feature can already be implemented through a plugin

Describe the user story When yarn is running in a docker container we need to change the host port for --inspect and --inspect-brk, e.g. yarn run --inspect-brk=0.0.0.0:9229 .... Currently yarn doesn't allow this even though node does. This feature is about restoring that functionality to yarn run.

Unknown Syntax Error: Command not found; did you mean one of:

  0. yarn run
  1. yarn run [--inspect] [--inspect-brk] <scriptName> ...

While running run --inspect-brk=0.0.0.0:9229 serverless offline start

Reference to node command line options https://nodejs.org/en/docs/guides/debugging-getting-started/#command-line-options

Describe the solution you'd like Feature parity between commands issued to yarn run and node.

Describe the drawbacks of your solution I don't think there are any drawbacks

Describe alternatives you've considered I tried with NODE_OPTIONS but that didn't work. The node documentation recommends using a ssh tunnel but this is awkward from inside a container.

closed time in 10 hours

esetnik

push eventesetnik/berry

Maël Nison

commit sha 3740667a8e393607802b4861f9419549a923b5f8

Format

view details

push time in 11 hours

push eventesetnik/berry

Maël Nison

commit sha c234b4e046ecb9066f806bb851aeca8d5c7205a7

Versions

view details

push time in 11 hours

push eventesetnik/berry

Maël Nison

commit sha 7b7d6b848f289f41d0da9f7b46e2701a45c6c5b0

Update 02af6d8d.yml

view details

push time in 11 hours

PR closed yarnpkg/berry

add prettier editor integration

What's the problem this PR addresses? Add pnp prettier support for berry development ...

How did you fix it? Added prettier as top level dependency, ran yarn dlx @yarnpkg/pnpify --sdk ...

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. -->

<!-- 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 have verified that all automated PR checks pass.
+73 -30

3 comments

14 changed files

esetnik

pr closed time in 11 hours

pull request commentyarnpkg/berry

add prettier editor integration

Out of curiosity, what was difficult in particular? Prettier is made of many various rules, is there one in particular you miss? We don't have anything against automating some formatting, but we try to configure it via ESLint rather than Prettier, due to its greater flexibility.

esetnik

comment created time in 11 hours

push eventyarnpkg/berry

Paul Soporan

commit sha 6c7ae021c4f878ab64f7a65f7758e313127a8231

fix(pnp): fix pnpEnableInlining (#1435)

view details

push time in 17 hours

delete branch yarnpkg/berry

delete branch : paul/fix/pnpEnableInlining

delete time in 17 hours

PR merged yarnpkg/berry

Reviewers
fix(pnp): fix pnpEnableInlining

What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->

path was used before being required, which caused pnpEnableInlining to completely break.

Closes #1073.

How did you fix it? <!-- A detailed description of your implementation. -->

We now require path before using it. ¯\(ツ)

I also added tests.

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. -->

<!-- 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 have verified that all automated PR checks pass.
+59 -0

0 comment

3 changed files

paul-soporan

pr closed time in 17 hours

issue closedyarnpkg/berry

[Bug] `pnpEnableInlining: false` doesn't work with a custom `pnpDataPath`

Bug description

Disabling pnp inlining and providing a custom path for the metadata file breaks yarn node and related.

Repro steps

Run the following commands in an empty directory:

yarn set version berry
yarn init
echo "pnpEnableInlining: false" >> .yarnrc.yml
echo "pnpDataPath: 'third_party/yarn_registry/pnp.meta.json'" >> .yarnrc.yml
mkdir -p third_party/yarn_registry/
yarn
yarn node

The last command will fail with the following error:

/private/tmp/repo/.pnp.js:13
  var dataLocation = path.resolve(__dirname, "third_party/yarn_registry/pnp.meta.json");
                     ^

ReferenceError: path is not defined
    at $$SETUP_STATE (/private/tmp/repo/.pnp.js:13:22)
    at Object.<anonymous> (/private/tmp/repo/.pnp.js:2580:29)
    at __webpack_require__ (/private/tmp/repo/.pnp.js:46:30)
    at /private/tmp/repo/.pnp.js:110:18
    at /private/tmp/repo/.pnp.js:113:10
    at webpackUniversalModuleDefinition (/private/tmp/repo/.pnp.js:19:20)
    at Object.<anonymous> (/private/tmp/repo/.pnp.js:26:3)
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)

Environment:

  • OS: macOS
  • Node version: 13.11.0
  • Yarn version: 2.0.0-rc.30

closed time in 17 hours

sebastian-nowak

issue closedyarnpkg/berry

[Feature] Better error messages on npm publish failed

  • [ ] I'd be willing to implement this feature
  • [ ] This feature can already be implemented through a plugin

Describe the user story

I wanted to publish a package on npm via yarn npm publish and I got the error:

YN0041: Invalid authentification (as undefined)

Actually it's because I haven't changed the version of my package... a better message saves time:

YN0041: Invalid version number

This request is not very important but would bring a better user experience. 🙂 Thank you for the work you're doing.

closed time in 17 hours

thewrath

issue commentyarnpkg/berry

[Feature] Better error messages on npm publish failed

Closing for now; feel free to reopen with the extra information

thewrath

comment created time in 17 hours

push eventyarnpkg/berry

Maël Nison

commit sha 0f02f1c224c65a24de622c4729b066d213191eb5

Allows requiring PnP files from the outside (#1432) * Fixes external imports into absolute internals * Versions * Fixes implementation * Fixes * Fixes test * Fixes test * Update pnp.test.js * Updates the hook

view details

push time in 18 hours

delete branch yarnpkg/berry

delete branch : mael/external-absolute

delete time in 18 hours

PR merged yarnpkg/berry

Allows requiring PnP files from the outside

What's the problem this PR addresses?

External files weren't able to require internal files, even when they were using absolute paths. This was because they never even entered the PnP resolution (since the hook detected that they belonged to a different "tree"), and the native resolution cannot access files within zip archives (https://github.com/nodejs/node/issues/33423).

Closes (?) #1000

How did you fix it?

We now try to detect absolute and relative imports and, if they are, we add them to their own pool of resolution parents if they're covered by a PnP API.

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. -->

<!-- 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. -->

  • [ ] I have verified that all automated PR checks pass.
+173 -64

0 comment

5 changed files

arcanis

pr closed time in 18 hours

push eventyarnpkg/berry

Maël Nison

commit sha 49c721a9cee7e3711e6ed50285af12e2ddc6e2ac

Updates the hook

view details

push time in 18 hours

push eventyarnpkg/berry

Maël Nison

commit sha a8a62011f48ef178c92d6880b591ccfee4a475b7

Fixes event emitter leaks (#1431) * Silences event emitter warnings * Versions

view details

Kristoffer K

commit sha 8e413812cd9263f0abd5db869385715b1535557c

fix(builder): enable treeshaking (#1428) * fix(builder): enable treeshaking * chore: versions

view details

Maël Nison

commit sha 528fdb39a70b12ea07fce7498a5d2b1be6ff8271

Merge remote-tracking branch 'origin/master' into mael/external-absolute

view details

push time in 18 hours

push eventyarnpkg/berry

Maël Nison

commit sha 24a5adaf802eb1b2c6600219670f35339bb35230

Fixes event emitter leaks (#1431) * Silences event emitter warnings * Versions

view details

Kristoffer K

commit sha c49fc03bdf5aab1bac94eb47789e5671aabf71d8

fix(builder): enable treeshaking (#1428) * fix(builder): enable treeshaking * chore: versions

view details

push time in 19 hours

push eventyarnpkg/berry

Kristoffer K

commit sha 8e413812cd9263f0abd5db869385715b1535557c

fix(builder): enable treeshaking (#1428) * fix(builder): enable treeshaking * chore: versions

view details

push time in a day

delete branch yarnpkg/berry

delete branch : merceyz/builder-esm

delete time in a day

PR merged yarnpkg/berry

fix(builder): enable treeshaking

What's the problem this PR addresses?

Treeshaking in @yarnpkg/builder is currently "disabled".

How did you fix it?

  • Make ts-loader output ESModules
  • Remove mainFields config to use the default, which is ['module', 'main'] when targeting node, so webpack can treeshake our dependencies
  • Remove babel-plugin-lazy-import, it didn't run before since ts-loader was outputting commonjs, once that was fixed it slowed down installs and prevented module concatenation, which is why output ESModules didn't reduce the size much.

Result Table of size changes for the CLI bundle in bytes

size reduction
Initial size 2 499 210 0
remove mainFields 2 447 348 51 862
output ESModules 2 446 597 751
Remove babel-plugin-lazy-import 2 388 508 58 089
Final size 2 388 508 110 702

Checklist

  • [x] I have read the Contributing Guide.
  • [x] I have set the packages that need to be released for my changes to be effective.
  • [x] I have verified that all automated PR checks pass.
+7877 -8873

0 comment

14 changed files

merceyz

pr closed time in a day

push eventyarnpkg/berry

Maël Nison

commit sha 1efeb933fd6503183eae19011184d59f9f932b59

Update pnp.test.js

view details

push time in a day

push eventyarnpkg/berry

Maël Nison

commit sha 543137702532a347060a1d15ecab4a426c2b9bc8

Fixes test

view details

push time in a day

push eventyarnpkg/berry

Maël Nison

commit sha 80114b8260ab72df2f450e0ea88f9c2e52b1ef18

Fixes test

view details

push time in a day

CommitCommentEvent

push eventyarnpkg/berry

Maël Nison

commit sha d1e8054e5299a6595113fadf9ab5bf2ff9650e0c

Fixes

view details

push time in 2 days

issue commentyarnpkg/berry

[Bug] `yarn patch` cannot apply some patches

For the first item, we haven't implemented unlink for zip archives yet, since it's not very useful. We'd be happy to review a PR, though!

For the second one, the problem is that Yarn didn't find the location to patch, which may happen when the files change too much across versions. There's probably an improvement we could do by storing the original file and the patch somewhere, so you can check what's the actual error.

alubbe

comment created time in 2 days

issue commentyarnpkg/berry

RequestError: self signed certificate in certificate chain

It isn't implemented at the moment. PR welcome 👐

danreg

comment created time in 2 days

push eventyarnpkg/berry

Maël Nison

commit sha 3112a302d18f42bbc5af8d1219a5633e3a06f7ad

Fixes implementation

view details

push time in 2 days

PR opened yarnpkg/berry

Allows requiring Pn

What's the problem this PR addresses?

External files weren't able to require internal files, even if they u

Closes (?) #1000

How did you fix it? <!-- A detailed description of your implementation. -->

...

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. -->

<!-- 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 have verified that all automated PR checks pass.
+149 -55

0 comment

5 changed files

pr created time in 2 days

create barnchyarnpkg/berry

branch : mael/external-absolute

created branch time in 2 days

push eventyarnpkg/berry

Maël Nison

commit sha a8a62011f48ef178c92d6880b591ccfee4a475b7

Fixes event emitter leaks (#1431) * Silences event emitter warnings * Versions

view details

push time in 2 days

delete branch yarnpkg/berry

delete branch : mael/event-emitter-leak

delete time in 2 days

PR merged yarnpkg/berry

Fixes event emitter leaks

What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->

The shell wasn't using a refcount for its ^C interception, causing leak warnings to be emitted.

How did you fix it?

We have two places where process are spawned: within the core, and within the shell. Since the shell doesn't depend on the core (that's intended), the logic needs to be duplicated between both.

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. -->

<!-- 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. -->

  • [ ] I have verified that all automated PR checks pass.
+51 -18

0 comment

3 changed files

arcanis

pr closed time in 2 days

PR opened yarnpkg/berry

Fixes event emitter leaks

What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->

The shell wasn't using a refcount for its ^C interception, causing leak warnings to be emitted.

How did you fix it?

We have two places where process are spawned: within the core, and within the shell. Since the shell doesn't depend on the core (that's intended), the logic needs to be duplicated between both.

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. -->

<!-- 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 have verified that all automated PR checks pass.
+51 -18

0 comment

3 changed files

pr created time in 2 days

create barnchyarnpkg/berry

branch : mael/event-emitter-leak

created branch time in 2 days

issue commentyarnpkg/berry

[Bug] @yarnpkg/core definitions uses ../../yarnpkg-fslib/sources

According to microsoft/TypeScript#36097 (comment) the inline imports is an intended behavior to avoid name conflicts and it makes sense

Inline imports make sense, but why would it use a relative path? That's the part I don't quite understand, since the autofix suggestions for undefined symbols are able to properly suggest the right import strings. It seems like TS has a bug that prevents it from using the package name 🤔

christophehurpeau

comment created time in 2 days

issue openednodenv/node-build

Release on homebrew

The latest Node releases are fixing CVEs marked as high impact, it would be important to make them widely available as soon as possible.

As a side note, wouldn't it make sense to include the update-version-defs command by default? This way users wouldn't be blocked on this package to start using new releases (ideally I'd even prefer the command to be optional, since it still requires I tell my engineers to run a command on their fleet).

created time in 2 days

push eventyarnpkg/berry

Maël Nison

commit sha b31718164edd895116f0c4e7df22623b2c04f9d5

Updates the SDK

view details

push time in 2 days

push eventyarnpkg/berry

Maël Nison

commit sha 418584546242ca5568aa4157711a8f6a7e7d5245

Fixes React warning

view details

push time in 2 days

pull request commentyarnpkg/berry

Search interactive command

JureSotosek

comment created time in 2 days

push eventyarnpkg/berry

Jure Sotosek

commit sha 1d9a6073bc6a287ba74380e198a0d91131ec3b86

Search interactive command (#1425) * search command scafolding * Added search functionality * ran yarn install * Clean unused code * Minor style changes * Add the ability to select * Add ability to install * Add loop to useListInput * Update useListInput.ts * Remove ts ignore * Added PoweredByAlgolia * Create 1e753e74.yml * Use structUtils.prettyIndent * Fix bug * Align prompt * Minor fix * Added margins * Remove unused package * Remove unused attributes * Add analyticsTags to Algolia Co-authored-by: Haroen Viaene <fingebimus@me.com> * Remove blue from PoweredByAlgolia * Remove prompt padding * Add downloads column * Add italic versions * Fixes constraints * Fixes constraints * Fixes versions Co-authored-by: Haroen Viaene <fingebimus@me.com> Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 2 days

PR merged yarnpkg/berry

Search interactive command

What's the problem this PR addresses? Package names can sometimes be long and cumbersome to remember. Having no information about the package can lead to bugs and can potentially even be a security threat.

How did you fix it? I added an interactive search command that also allows you to search for packages and add them from your terminal.

It's powered by Algolia's npm index that is also powering the search on the website.

Inspired by and to a big extent modeled after @maticzav's emma-cli 🙏🏼

Preview: Screenshot 2020-05-31 at 20 04 08 Screenshot 2020-05-31 at 20 04 21 Screenshot 2020-05-31 at 20 04 49

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. -->

<!-- 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 have verified that all automated PR checks pass.
+603 -191

12 comments

33 changed files

JureSotosek

pr closed time in 2 days

push eventJureSotosek/berry

Maël Nison

commit sha 90fdd042bcf3ac7214570e6153fae14be150d5c2

Fixes versions

view details

push time in 3 days

push eventJureSotosek/berry

Maël Nison

commit sha 3bfec1845af860ac7757a5245b953efdc522d841

Fixes constraints

view details

push time in 3 days

push eventJureSotosek/berry

Maël Nison

commit sha 7452b9cd202c9bddd562ed93b75601a84c919615

Fixes constraints

view details

push time in 3 days

issue commentmicrosoft/vscode

typescript-language-features doesn't seem to work on virtual file system

@mjbvz now that VSCode May supports click to jump, #98830 is fixed. However, an issue remains where VSCode doesn't start the TypeScript server for virtual files, so the click to jump support is limited to a single jump (you can't jump from a zip archive to something else).

I understand it could have adverse effects, but I think our community would be happy to help fix and test this problem. Would you have some pointers where we should start? To start, do you have a rough idea where the TS server is spawned that could not take virtual filesystems into account?

aslatter

comment created time in 4 days

push eventpaul-soporan/berry

Maël Nison

commit sha d5d37cd528a6504e81ca07c7e43a7c2cd7651954

Fixes build

view details

push time in 4 days

push eventJureSotosek/berry

Paul Soporan

commit sha a02718da8db60b95575aff39e3dd780755a60f53

feat(plugin-npm-cli): yarn npm logout (#1416)

view details

Kristoffer K

commit sha 4e5079a71eb3a201239e5d43d85060dbfd348c66

fix(git): disable core.autocrlf when cloning a repo (#1410)

view details

Mark Ingram

commit sha 3bd3ecfcc80ec3e4eef67814736fb528c02ac998

fix(fslib): ZipFS readSync can lead to hang (#1409) * fix(fslib): ZipFS readSync handles null position * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Paul Soporan

commit sha 0a676b1986835569869d569b70e056ef9a588378

ci(e2e-parcel): improve parcel test (#1413) * ci(e2e-parcel): improve parcel test * ci(e2e-parcel): add an import to mdx test * ci(e2e-parcel): fix mdx test * ci(e2e-parcel): fix and improve mdx test * ci(e2e-parcel): fix mdx test * ci: fix mdx test * ci: fix mdx e2e test * chore: add rollup and angular over pnpify badges to readme

view details

Paul Soporan

commit sha 13ec534530ba83ef3c3641cd82e2ac8d9f8aa0a0

feat(version-check-interactive): display keybindings (#1407) * feat(version-check-interactive): display keybindings * chore(release-workflow): set releases * feat: make <tab> description shorter * feat: improve display

view details

Kristoffer K

commit sha a5b06208c25306c46ff4ea231866d484175da6cc

perf(pnp): cache result of findApiPathFor (#1415) * perf(pnp): cache result of findApiPathFor * chore: versions

view details

Maël Nison

commit sha f7371b70e62ee40ade8183bb75aa933181723481

Fixes some Git installs (#1405) * Various fixes * Version * Refactors the configuration workflow * Updates versions * Updates versions * Fixes * Trimming escape codes doesnt actually work * Upgrades clipanion * Fixes yarn config * Fixes searchbox enter * Versions

view details

Kristoffer K

commit sha d60f0439d70153f822dedbeedf4712af8f315122

perf(core): skip await if response has already resolved (#1422) * perf(core): avoid unnecessary await when get response is in cache * chore: versions

view details

Kristoffer K

commit sha 6dda734d7796fc4aaa0696a1f2298bcf3cd73ffb

perf: change build target to es2018 (#1423) * perf: change build target to es2018 * chore: versions * chore: set engines.node to >= 10.19.0 * chore: remove plugin-proposal-async-generator-functions * chore: more versions

view details

Timothy Gu

commit sha beeed874364539032ad4d4362795eb3b1128334f

feat(plugin-compat): add missing jss-plugin-rule-value-function dependency to extensions (#1424) * Add jss-plugin-rule-value-function to extensions See https://github.com/cssinjs/jss/pull/1315. * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Kristoffer K

commit sha e6e17f6fb18d3511d4fcd92fa02cec74d615dbe7

fix: normalize pwd environment variable behaviour (#1390) * fix(shell): set pwd environment variable * fix(core): set pwd environment variable * chore: versions * Only updates PWD if it exists Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Michael Luo

commit sha 8e77d191926e841faaf7093de24db0409e6094a7

check process.versions.pnp before setup pnp for vs code extension. (#1309) * check process.versions.pnp before setup pnp * update release note * Improves support for extra options Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Maël Nison

commit sha f6bad1f283fe735da8a1dd723f901ab8dc764290

Merge remote-tracking branch 'origin/master' into pr/JureSotosek/1425

view details

push time in 4 days

push eventyarnpkg/berry

Paul Soporan

commit sha 7a0631c3d2e5df79ab8492a813817aa6cc3e1185

fix: change JailFS to CwdFS and improve CwdFS (#1412) * feat(fslib): add levels to JailFS * refactor(fslib): convert `computeLevels` to static method * refactor: remove levels and change JailFS to CwdFS * chore: revert old behavior for link fetchers * chore: ping ci * Fixes the prefixPath from WorkspaceFetcher * fix: change JailFS to CwdFS * chore: update versions * Makes the prefixPath relative * Fixes patches * Explicitly roots the NodeFS using CwdFS * Updates the hook * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 4 days

delete branch yarnpkg/berry

delete branch : paul/feat/jailfs/levels

delete time in 4 days

PR merged yarnpkg/berry

Reviewers
fix: change JailFS to CwdFS and improve CwdFS

What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->

It's not currently possible to have a single folder for patches at the root level of the project, because patch paths are resolved using the parentFs, which is a JailFS targeting the workspace folder in the case of workspaces.

How did you fix it? <!-- A detailed description of your implementation. -->

I added a new feature to JailFS: levels. They represent the maximum number of levels the Jail can be escaped by paths.

Example for new JailFS(path, {levels: 1}):

  • text.txt - works
  • ../text.txt - works
  • ../../text.txt - nope, the FS has to climb too many levels to resolve this path

I also added a new static method (computeLevels) on the JailFS class, used to compute the levels between 2 paths.

I also made the JailFS in the WorkspaceFetcher (the packageFs) use the new levels feature, so that patches at the root of the project can be accessed from any workspace.

I also added tests and updated the PnP hook.

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. -->

<!-- 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 have verified that all automated PR checks pass.
+205 -77

4 comments

23 changed files

paul-soporan

pr closed time in 4 days

issue closedyarnpkg/berry

[Feature] Support env variables in yarnrc

  • [x] I'd be willing to implement this feature
  • [ ] This feature can already be implemented through a plugin

Describe the user story

yarn v1 supports env variables in yarnrc/npmrc:

//registry.npmjs.org/:_authToken=${COMPANY_NPM_TOKEN}

but v2 doesn't support it in .yarnrc.yml

Describe the solution you'd like

It would be nice to support env variables like in other tools/libraries (for example docker compose)

closed time in 4 days

7rulnik

issue commentyarnpkg/berry

[Feature] Support env variables in yarnrc

Fixed in https://github.com/yarnpkg/berry/pull/1341 💫

7rulnik

comment created time in 4 days

pull request commentyarnpkg/berry

feat: Support environent variables in config

Perfect! Thanks @7rulnik! 😃

7rulnik

comment created time in 4 days

push eventyarnpkg/berry

Valentin Semirulnik

commit sha 5f58dc53cdfacc7261ae2de69108a1d832d9e09b

feat: Support environent variables in config (#1341) * add replaceEnvVariables * add release data * fix ts error * move env replacement into parseSingleValue * add tests for env replacement * add documentation for env variables * refactor replace to .search method * add test for mupltiple variables * Some refactorings * Wording Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 4 days

PR merged yarnpkg/berry

Reviewers
feat: Support environent variables in config

What's the problem this PR addresses?

Lack of support of environment variables in config files https://github.com/yarnpkg/berry/issues/1146

How did you fix it?

Stringify yarnrc configs, split it by variables, replace with value from process.env, and fallback if it's not set.

I took fallback algorythm from docker-compose:

Added support for shell-style inline defaults in variable interpolation. The supported forms are ${FOO-default} (fall back if FOO is unset) and ${FOO:-default} (fall back if FOO is unset or empty).

If you fine with this implementation I will add tests and will document this. Also I could rewrite it to deep-map and map strings only. It should be a better variant

Note that regexp named groups have limited support: http://kangax.github.io/compat-table/es2016plus/#test-RegExp_named_capture_groups. If this is a problem I can refactor it

+148 -9

4 comments

5 changed files

7rulnik

pr closed time in 4 days

push eventyarnpkg/berry

Maël Nison

commit sha d6b819ef5d224d1fdd42bfda9cb2adfedb74d399

Versions

view details

push time in 4 days

push eventyarnpkg/berry

Maël Nison

commit sha 075533f34c553e3f6b33dfcae76c5da7f8847ae4

Updates the hook

view details

push time in 4 days

push event7rulnik/berry

Maël Nison

commit sha 92ff75a8a527fb893c32688650edaf94e8bc4dd4

Wording

view details

push time in 4 days

push eventyarnpkg/berry

Maël Nison

commit sha 7f8e0e289b82336ec159c63f38c0e2c8c2ae3bf4

Explicitly roots the NodeFS using CwdFS

view details

push time in 4 days

issue commentyarnpkg/berry

[Bug] @yarnpkg/core definitions uses ../../yarnpkg-fslib/sources

Yep it's a really annoying one 🙁 I'm not exactly sure what happens, but I suspect it's because TypeScript doesn't seen node_modules in the path, so it uses a relative path.

I was wondering if it could be solved by adding a paths configuration in our configuration script to explicitly map the packages to their names, but I haven't had the chance to try it yet. If you could give it a look I would greatly appreciate!

christophehurpeau

comment created time in 4 days

pull request commentyarnpkg/berry

Search interactive command

Sounds good, let's keep it this way for now then! We can always iterate if needed 👍

JureSotosek

comment created time in 4 days

push event7rulnik/berry

Michael

commit sha 63eff4d7a0edfc9b1c75a0eb4a719ef425a1dee4

fix(yarnpkg-libui): Fixed linting error (#1383)

view details

Victor Vlasenko

commit sha 80e2cc43f66c908a9ded7b35204774a5b5512601

[pnpify] Persist virtual node_modules dir to disk on file write (#1391) * Create virtual nm dir on file write * Bump versions again

view details

Valentin Semirulnik

commit sha 40f90cb7a67a496deebf52e7d70eb13e59dcb4a3

docs: add package name into title (#1395)

view details

Valentin Semirulnik

commit sha e8ad59a3a7b5f1d7b1fc36e2dd778fe3e993d7a6

change id for scroll restoration (#1394)

view details

Valentin Semirulnik

commit sha e35b2bf90f331250ba8bc6be60538c54ea64f44e

add rewrite for /package/* (#1396)

view details

Timon Lukas

commit sha c487737f2e82acdfd57cdf6033440cd84dc75d64

feat: dlx now respects cwd's .yarnrc.yml (#1387) * Implement dlx copying local `.yarnrc.yml` * Add test for `dlx` respecting locally-defined custom scope * Add version information * Fix tests * Remove left-over scope definition for testing purposes * Use projectCwd instead of xfs.cwd() (which could be problematic with workspaces) * Use Configuration utility to ensure `enableGlobalCache === false` instead of manual substitution * Add proper version upgrade information * Remove plugin-specific config options from copied .yarnrc.yml * Update version upgrade information * Add test case for plugin-specific configuration entries * Instead of removing plugin config entries, rewrite plugin definition paths to also support them from dlx * Remove unnecessary checks for whether files exist * Add safe-guard for projectCwd === null * Use npath to resolve plugin paths since they are user-facing * Add test case for absolute plugin paths * Add explicit handling for absolute plugin paths * Update version upgrade information * Remove unused value * Few stylistic changes * Update dlx.ts * Update dlx.ts Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Jono Mingard

commit sha aa69a45c2d965da1dd94ec1ad0692cdbcd4c4df5

feat: Allow specifying arbitrary fields to be added to package.json during `yarn init` (#1393) * feat: add initFields option to add fields when using yarn init (#1374) * chore: bump version * docs: add initFields option to documentation (#1374) * docs: remove references to initLicense and initVersion initFields does these and much more

view details

Paul Soporan

commit sha 4965fa039e06c4f25f49431ca816266eb0221187

feat(plugin-npm): show deprecation warnings (#1401) * feat(plugin-npm): show deprecation warnings * chore(release-workflow): set releases * docs: add DEPRECATED_PACKAGE error code

view details

Kristoffer K

commit sha 2035b204c1f32591436f32e2503fa95a6dcbdabd

feat: compress compat patches and the pnp hook (#1400) * feat(compat): compress patches using brotli * feat(pnp): compress the hook source using brotli * chore: versions * Tries to add patch validations to the workflow * Verifies the patches when they change * Fixes path * Adds author config * Validates the hook too * Fixes the hook * fix: normalize line endings Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Paul Soporan

commit sha d017aebe58e92e567b06e775d2e384957fb601f1

ci(e2e): add e2e test for parcel (#1399) * ci(e2e): add e2e test for parcel * ci: log which version of yarn is used * chore: disable inline builds TO REVERT LATER * ci: remove extra mkdir * ci: add missing dependency * ci: update e2e-parcel-workflow.yml * Update e2e-parcel-workflow.yml * Update e2e-parcel-workflow.yml * ci: update e2e-parcel-workflow.yml * Update e2e-parcel-workflow.yml * Update e2e-parcel-workflow.yml * chore(release-workflow): set releases * docs: add readme badge * ci: tweak YARN_ENABLE_INLINE_BUILDS * Fixes npm build stream Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Paul Soporan

commit sha a0b893dc164a22a883c96143a90ca6c20acc8d26

feat: minified plugins and yarn plugin import from sources (#1379) * feat: minified plugins and yarn plugin import from sources * chore(release-workflow): set releases * feat: save plugins as .cjs files * refactor: remove this binding * fix: clone repo in subfolder based on hash of repo * Update packages/plugin-essentials/sources/commands/plugin/import/sources.ts Co-authored-by: Maël Nison <nison.mael@gmail.com> * Fixes path import Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Maël Nison

commit sha 467e05f45ca00e708d400c0fb17f897dbfccf14e

Update PULL_REQUEST_TEMPLATE.md

view details

Bram Gotink

commit sha 8dc90c245bc2f5c06f33c736d100e16a92e1ead7

Update cross-spawn (#1403) * Update cross-spawn This version fixes a bug where node was resolved to the wrong binary on Windows, resulting in the wrong version of node being called if yarn is executed with a node version that's not the first node on the PATH. Fixes #1377 * chore: update lockfile * chore: update cache Co-authored-by: merceyz <merceyz@users.noreply.github.com>

view details

Paul Soporan

commit sha a02718da8db60b95575aff39e3dd780755a60f53

feat(plugin-npm-cli): yarn npm logout (#1416)

view details

Kristoffer K

commit sha 4e5079a71eb3a201239e5d43d85060dbfd348c66

fix(git): disable core.autocrlf when cloning a repo (#1410)

view details

Mark Ingram

commit sha 3bd3ecfcc80ec3e4eef67814736fb528c02ac998

fix(fslib): ZipFS readSync can lead to hang (#1409) * fix(fslib): ZipFS readSync handles null position * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Paul Soporan

commit sha 0a676b1986835569869d569b70e056ef9a588378

ci(e2e-parcel): improve parcel test (#1413) * ci(e2e-parcel): improve parcel test * ci(e2e-parcel): add an import to mdx test * ci(e2e-parcel): fix mdx test * ci(e2e-parcel): fix and improve mdx test * ci(e2e-parcel): fix mdx test * ci: fix mdx test * ci: fix mdx e2e test * chore: add rollup and angular over pnpify badges to readme

view details

Paul Soporan

commit sha 13ec534530ba83ef3c3641cd82e2ac8d9f8aa0a0

feat(version-check-interactive): display keybindings (#1407) * feat(version-check-interactive): display keybindings * chore(release-workflow): set releases * feat: make <tab> description shorter * feat: improve display

view details

Kristoffer K

commit sha a5b06208c25306c46ff4ea231866d484175da6cc

perf(pnp): cache result of findApiPathFor (#1415) * perf(pnp): cache result of findApiPathFor * chore: versions

view details

Maël Nison

commit sha f7371b70e62ee40ade8183bb75aa933181723481

Fixes some Git installs (#1405) * Various fixes * Version * Refactors the configuration workflow * Updates versions * Updates versions * Fixes * Trimming escape codes doesnt actually work * Upgrades clipanion * Fixes yarn config * Fixes searchbox enter * Versions

view details

push time in 4 days

pull request commentyarnpkg/berry

feat(plugin-essentials): add support for glob patterns to yarn remove and yarn up

Awesome, thanks for adding tests!

paul-soporan

comment created time in 4 days

push eventyarnpkg/berry

Paul Soporan

commit sha 12f6fe4d4d9e0561984ae52545825fc03f8200ca

feat(plugin-essentials): add support for glob patterns to yarn remove and yarn up (#1421) * feat(plugin-essentials): add support for glob patterns to yarn remove * feat(plugin-essentials): add support for glob patterns to yarn up * docs: add command glob patterns to command docs * chore(release-workflow): set releases * docs: tweak command docs * Avoid implicit map callback * Fixes incorrect variable name * test: add tests * refactor: remove extra non-null assertion Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 4 days

delete branch yarnpkg/berry

delete branch : paul/feat/command-glob-patterns

delete time in 4 days

PR merged yarnpkg/berry

Reviewers
feat(plugin-essentials): add support for glob patterns to yarn remove and yarn up

What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->

yarn remove and yarn up don't currently support glob patterns, which makes removing / upgrading all dependencies containing a specific scope / word more difficult than it should be.

Closes #1418.

How did you fix it? <!-- A detailed description of your implementation. -->

I implemented glob support to both yarn remove and yarn up, using micromatch, the library that we already use for everything glob related.

For yarn remove, we get the list of idents for a scope and we iterate over the matches, removing the descriptor corresponding to the matched ident.

For yarn up, we get the list of idents for a scope and we iterate over the matches, setting the existing descriptor to the descriptor corresponding to the matched ident, and the descriptor used in the request to a new descriptor, created from the matched ident and the range of the pattern. For obvious reasons, the range has to be static, so glob patterns can only be used for the ident part of the descriptor.

I haven't added any tests yet, but locally all of the examples I added to the documentation work, so nothing that previously worked should be broken.

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. -->

<!-- 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 have verified that all automated PR checks pass.
+251 -46

2 comments

10 changed files

paul-soporan

pr closed time in 4 days

issue closedyarnpkg/berry

[Feature] Support glob patterns with yarn up

  • [ ] I'd be willing to implement this feature
  • [ ] This feature can already be implemented through a plugin

Describe the user story

As already described in #1414 it would be great if there were a way to upgrade multiple dependencies - e.g. all dependencies with a specific scope.

Describe the solution you'd like

As @arcanis already mentioned, it would be great if the yarn up command would support glob patterns.

I don't think yarn up supports glob patterns yet, but it seems a good idea and we'd likely merge a PR to this effect ! Then you'd just run yarn up @company/*@canary.

closed time in 4 days

ChiefORZ

push eventyarnpkg/berry

Maël Nison

commit sha 50be71c3ff7f70d9c2db105a41f176dafec55166

Fixes patches

view details

push time in 4 days

push eventyarnpkg/berry

Paul Soporan

commit sha a02718da8db60b95575aff39e3dd780755a60f53

feat(plugin-npm-cli): yarn npm logout (#1416)

view details

Kristoffer K

commit sha 4e5079a71eb3a201239e5d43d85060dbfd348c66

fix(git): disable core.autocrlf when cloning a repo (#1410)

view details

Mark Ingram

commit sha 3bd3ecfcc80ec3e4eef67814736fb528c02ac998

fix(fslib): ZipFS readSync can lead to hang (#1409) * fix(fslib): ZipFS readSync handles null position * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Paul Soporan

commit sha 0a676b1986835569869d569b70e056ef9a588378

ci(e2e-parcel): improve parcel test (#1413) * ci(e2e-parcel): improve parcel test * ci(e2e-parcel): add an import to mdx test * ci(e2e-parcel): fix mdx test * ci(e2e-parcel): fix and improve mdx test * ci(e2e-parcel): fix mdx test * ci: fix mdx test * ci: fix mdx e2e test * chore: add rollup and angular over pnpify badges to readme

view details

Paul Soporan

commit sha 13ec534530ba83ef3c3641cd82e2ac8d9f8aa0a0

feat(version-check-interactive): display keybindings (#1407) * feat(version-check-interactive): display keybindings * chore(release-workflow): set releases * feat: make <tab> description shorter * feat: improve display

view details

Kristoffer K

commit sha a5b06208c25306c46ff4ea231866d484175da6cc

perf(pnp): cache result of findApiPathFor (#1415) * perf(pnp): cache result of findApiPathFor * chore: versions

view details

Maël Nison

commit sha f7371b70e62ee40ade8183bb75aa933181723481

Fixes some Git installs (#1405) * Various fixes * Version * Refactors the configuration workflow * Updates versions * Updates versions * Fixes * Trimming escape codes doesnt actually work * Upgrades clipanion * Fixes yarn config * Fixes searchbox enter * Versions

view details

Kristoffer K

commit sha d60f0439d70153f822dedbeedf4712af8f315122

perf(core): skip await if response has already resolved (#1422) * perf(core): avoid unnecessary await when get response is in cache * chore: versions

view details

Kristoffer K

commit sha 6dda734d7796fc4aaa0696a1f2298bcf3cd73ffb

perf: change build target to es2018 (#1423) * perf: change build target to es2018 * chore: versions * chore: set engines.node to >= 10.19.0 * chore: remove plugin-proposal-async-generator-functions * chore: more versions

view details

Paul Soporan

commit sha b87d0151600de0bb5151d45cc101c0c05af87914

Merge branch 'master' into paul/feat/jailfs/levels

view details

Timothy Gu

commit sha beeed874364539032ad4d4362795eb3b1128334f

feat(plugin-compat): add missing jss-plugin-rule-value-function dependency to extensions (#1424) * Add jss-plugin-rule-value-function to extensions See https://github.com/cssinjs/jss/pull/1315. * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Kristoffer K

commit sha e6e17f6fb18d3511d4fcd92fa02cec74d615dbe7

fix: normalize pwd environment variable behaviour (#1390) * fix(shell): set pwd environment variable * fix(core): set pwd environment variable * chore: versions * Only updates PWD if it exists Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Michael Luo

commit sha 8e77d191926e841faaf7093de24db0409e6094a7

check process.versions.pnp before setup pnp for vs code extension. (#1309) * check process.versions.pnp before setup pnp * update release note * Improves support for extra options Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Maël Nison

commit sha 87cd27953ce9a7c07310ae2f72d57e5f65f9d087

Merge remote-tracking branch 'origin/master' into paul/feat/jailfs/levels

view details

Maël Nison

commit sha 7353f780d8af5df6ac8db3497aab59779db4441a

Makes the prefixPath relative

view details

push time in 4 days

push eventpaul-soporan/berry

Kristoffer K

commit sha 3c5b37ec44846ca3de775d00d2ff9861913b2ecb

fix(core): format FormatType.PATH as NativePath (#1361) * fix(core): format FormatType.PATH as NativePath * chore: versions

view details

Kristoffer K

commit sha b314385f43793fe0b739378125de0d183a7243b7

fix(patch): handle windows paths in patch-commit (#1332)

view details

Jure Sotošek

commit sha 73d67b22f75c5a9dc7f7d621ea58125abd9c6168

Upgrade interactive tweaks (#1323) * Add an info sections and a header to upgrade-interactive * Truncate text fixes * Fix widths and margins * Package -> Name * Change colors * Change colors * Fixes * Create 8045181c.yml * Update 8045181c.yml * Update 8045181c.yml * Update 8045181c.yml * Remove "Name" column name * Add spacing and colapse the info section * Add spacing and align columns

view details

Danny Coates

commit sha e2057ba860cc97dda3f66b97ea7c206a3f9a4ea2

fix(workspace-tools): focus command should persist install state (#1366) fixes #1364

view details

Kristoffer K

commit sha 1deddd38f6a569bf3ebe4be49269a9db65c5af6c

fix(builder): don't reindent plugin sources (#1363) * fix(builder): don't reindent plugin sources * chore: version * chore: remove unused reindent function

view details

Yuping Zuo

commit sha 8fc1a7ace217dc8c86fb6ed61a534b8f1ba9c4b5

docs(editor-sdks): update instruction to use yarn dlx (#1368) `@yarnpkg/pnpify` is not required as a dependency to keep existing pnpify working, update the instruction to use `yarn dlx` instead to avoid an extra dependency.

view details

Sam Zhou

commit sha 97b0c1ebc0cd921dc4bc408ef57695b9e21f3d6e

docs(gatsby): Fix typo in compatibility table (#1369) The format is broken in #1294. this commit fixes it.

view details

Jure Sotošek

commit sha 61500cce38a28313813bd671d4f8df1de0734272

Replace emojis with Unicode characters (#1365) * Replace emojis with unicode characters and add extra spacing * Remove extra spacing * Create 39204e65.yml

view details

Maël Nison

commit sha 0c37e19beb0c97e5274ddd8cb78f7ff46538686f

Fixes global overrides when used with -e (#1371) * Fixes global overrides when used with -e * Versions

view details

Yuping Zuo

commit sha 0c7582b3751a7b36a99de7941493c1105c66945f

docs(sherlock): add a note about plugins (#1370)

view details

Paul Soporan

commit sha 910db82a2874c7c5d2c614d2594b4774f8de4561

chore: fix typedoc (#1372) * chore: fix typedoc * chore: remove xterm leftovers I've wanted to do this for a long time, but I couldn't find a good opportunity. * chore: remove micromatch leftovers Same thing: I've wanted to do this for a long time, but I couldn't find a good opportunity.

view details

Maël Nison

commit sha 5003627b14d9ee082e63d6aa757f3b14e13dff77

Update LICENSE.md

view details

Bram Gotink

commit sha f43d3deed96b738e194044ad409fe14d6cb4d5f0

Always create path wrapper executables without suffix (#1386) These are used in BASH environments on Windows as well. Note that yarn 1 and berry using the node-modules linker also create executables for a Bourne Shell compatible environment and .cmd executables for CMD / PowerShell.

view details

Paul Soporan

commit sha e7b11dda5c8f5bb6b55678da304b3893a1c5a6f1

docs: small changes (#1385) * chore: change npm tag * Update README.md * docs: add note about playground * docs: add caveat to pnp loose mode * docs: change pnpIgnorePattern to pnpIgnorePatterns * docs: change wrong strings to numbers * docs: improve offline cache documentation * docs: colorize numbers * docs: fix path * docs: add note about changesetIgnorePatterns on the release workflow page * docs: improve contributing page * chore: improve pull request template * docs: add note to contributing guide * docs: add faq section to pnp page * Update PULL_REQUEST_TEMPLATE.md * Update contributing.md Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Paul Soporan

commit sha d92f8d470086630c3a631fdefcab1d3114d3d796

fix(plugin-typescript): preserve strategies (#1314) * fix(plugin-typescript): preserve strategies * chore(release-workflow): set releases * refactor(plugin-typescript): use non-null assertion for nonNullSuggestions * refactor: compute types range based on base descriptor range * refactor(plugin-typescript): change logic I used the snippet written by: Co-authored-by: Maël Nison <nison.mael@gmail.com> * test(plugin-typescript): add tests for new logic Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Maël Nison

commit sha 05e80452d242b58b1c9bb4be55cba8fead2a4822

Update index.ts

view details

Benjie Gillam

commit sha f9b6504d52b07501d71344456ca3ffc180ca67ee

docs: fix typo (tological -> topological) (#1378) * docs: fix typo (tological -> topological) * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

Maël Nison

commit sha 8890671ba9d830da8b2e21aaa49bd682d6c1227e

Create CODEOWNERS

view details

Paul Soporan

commit sha f169d9adc439155846e953b11cf7cb15c5127936

chore: add license field to manifests (#1388) * chore: add license field to manifests * chore(release-workflow): set releases * chore: fix linting error on master

view details

Maël Nison

commit sha 20d3011dfdf6fb28995fff46edc800e6e4068407

Update lexicon.md

view details

push time in 4 days

Pull request review commentyarnpkg/berry

check process.versions.pnp before setup pnp for vs code extension.

 const TEMPLATE = (relPnpApiPath: PortablePath, module: string, {setupEnv = false   `const absPnpApiPath = resolve(__dirname, relPnpApiPath);\n`,   `const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);\n`,   `\n`,-  `if (existsSync(absPnpApiPath)) {\n`,+  `if (existsSync(absPnpApiPath) && !process.versions.pnp) {\n`,

Forgot to comment back! Basically, if you instantiate an extension with usePnpify=false, then another with usePnpify=true, PnPify wouldn't have been loaded at all because the first one would have set process.versions.pnp, and the second one would have seen that and bailout. By using three differen value, we can be sure that the different patches are applied in isolation.

missing1984

comment created time in 4 days

push eventyarnpkg/berry

Michael Luo

commit sha 8e77d191926e841faaf7093de24db0409e6094a7

check process.versions.pnp before setup pnp for vs code extension. (#1309) * check process.versions.pnp before setup pnp * update release note * Improves support for extra options Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 4 days

PR merged yarnpkg/berry

check process.versions.pnp before setup pnp for vs code extension.

What's the problem this PR addresses? https://github.com/yarnpkg/berry/issues/1243

When we generated pnp sdk for eslint/prettier and typescript we apply the patch every time extension require their module. This caused serious performance downgrade for vscode node process. ...

How did you fix it? check process.versions.pnp before applying patch. ...

+29 -12

0 comment

2 changed files

missing1984

pr closed time in 4 days

delete branch yarnpkg/berry

delete branch : merceyz/pwd

delete time in 4 days

push eventyarnpkg/berry

Kristoffer K

commit sha e6e17f6fb18d3511d4fcd92fa02cec74d615dbe7

fix: normalize pwd environment variable behaviour (#1390) * fix(shell): set pwd environment variable * fix(core): set pwd environment variable * chore: versions * Only updates PWD if it exists Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 4 days

PR merged yarnpkg/berry

Reviewers
fix: normalize pwd environment variable behaviour

What's the problem this PR addresses?

Some terminals set the PWD environment variable, some don't. On windows the value of the variable is different depending on where the command was run. Running node -p process.env.PWD directly in Git Bash returns /c/berry, while running it from Git Bash as an integrated terminal in VSCode returns C:/berry. Running yarn node -p process.env.PWD returns /c/berry in both scenarios. It would be nice to have some consistency here.

How did you fix it?

Set the PWD environment variable whenever a process is spawned

Checklist

  • [x] I have read the Contributing Guide.
  • [x] I have set the packages that need to be released for my changes to be effective.
  • [x] I have checked for unmet constraints.
+49 -4

1 comment

3 changed files

merceyz

pr closed time in 4 days

pull request commentyarnpkg/berry

fix: normalize pwd environment variable behaviour

I've updated the code to only set the PWD if it already exists; I think it should be good to go for now - if later the path is a problem we can see to improve that.

merceyz

comment created time in 4 days

pull request commentyarnpkg/berry

Search interactive command

Looks really great! A few pieces of feedback on my side:

  • There's a slight padding at the left of the instruction, is it intended? I'd prefer to align it to the terminal, it seems unexpected:

image

  • More importantly, can you add a column with the number of download, ideally with different colours to highlight the ones with a higher download count? This could help a lot in the cases of uglify / uglifyjs, etc.

image

  • I wonder if we could improve the interface with something akin to the yarn version change command: instead of selecting the packages to install them, we would just select the target (by using the left / right arrow to choose one of regular / dev / peer, just like we use left / right to select major / minor / ... on version change) and press enter.
JureSotosek

comment created time in 4 days

Pull request review commentyarnpkg/berry

Search interactive command

+import {BaseCommand}                         from '@yarnpkg/cli';+import {Configuration, FormatType}           from '@yarnpkg/core';+import {ScrollableItems}                     from '@yarnpkg/libui/sources/components/ScrollableItems';+import {useMinistore}                        from '@yarnpkg/libui/sources/hooks/useMinistore';+import {useSpace}                            from '@yarnpkg/libui/sources/hooks/useSpace';+import {renderForm, SubmitInjectedComponent} from '@yarnpkg/libui/sources/misc/renderForm';+import {Command, Usage}                      from 'clipanion';+import InkTextInput, {InkTextInputProps}     from 'ink-text-input';+import {Box, Text, Color}                    from 'ink';+import React, {useEffect, useState}          from 'react';++import {AlgoliaPackage, search}              from '../algolia';++const targets = [`regular`, `dev`, `peer`];++// eslint-disable-next-line arca/no-default-export+export default class SearchCommand extends BaseCommand {+  static usage: Usage = Command.Usage({+    category: `Interactive commands`,+    description: `open the search interface`,+    details: `+    This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.+    `,+    examples: [[+      `Open the search window`,+      `yarn search`,+    ]],+  });++  @Command.Path(`search`)+  async execute() {+    const configuration = await Configuration.find(this.context.cwd, this.context.plugins);++    const prettyName = (name: string) => {+      const hasScope = name.includes(`/`);++      if (hasScope) {+        const [scope, descriptor] = name.split(`/`);+        return <>{configuration.format(`${scope}/`, FormatType.SCOPE)}{configuration.format(descriptor, FormatType.NAME)}</>;+      } else {+        return configuration.format(name, FormatType.NAME);+      }+    };++    const Prompt = () => {+      return (+        <Box flexDirection="row">+          <Box flexDirection="column" width={49}>+            <Box marginLeft={1}>+             Press <Color bold cyanBright>{`<up>`}</Color>/<Color bold cyanBright>{`<down>`}</Color> to move between packages.+            </Box>+            <Box marginLeft={1}>+             Press <Color bold cyanBright>{`<space>`}</Color> to select a package.+            </Box>+            <Box marginLeft={1}>+              Press <Color bold cyanBright>{`<space>`}</Color> again to change the target.+            </Box>+          </Box>+          <Box flexDirection="column">+            <Box marginLeft={1}>+              Press <Color bold cyanBright>{`<enter>`}</Color> to install the selected packages.+            </Box>+            <Box marginLeft={1}>+             Press <Color bold cyanBright>{`<ctrl+c>`}</Color> to abort.+            </Box>+          </Box>+        </Box>

My symmetry hurts 😢 But in this case there really isn't another place to put it, so I guess it'll be fine, ahah 😄

JureSotosek

comment created time in 4 days

Pull request review commentyarnpkg/berry

Search interactive command

+import {BaseCommand}                         from '@yarnpkg/cli';+import {Configuration, FormatType}           from '@yarnpkg/core';+import {ScrollableItems}                     from '@yarnpkg/libui/sources/components/ScrollableItems';+import {useMinistore}                        from '@yarnpkg/libui/sources/hooks/useMinistore';+import {useSpace}                            from '@yarnpkg/libui/sources/hooks/useSpace';+import {renderForm, SubmitInjectedComponent} from '@yarnpkg/libui/sources/misc/renderForm';+import {Command, Usage}                      from 'clipanion';+import InkTextInput, {InkTextInputProps}     from 'ink-text-input';+import {Box, Text, Color}                    from 'ink';+import React, {useEffect, useState}          from 'react';++import {AlgoliaPackage, search}              from '../algolia';++const targets = [`regular`, `dev`, `peer`];++// eslint-disable-next-line arca/no-default-export+export default class SearchCommand extends BaseCommand {+  static usage: Usage = Command.Usage({+    category: `Interactive commands`,+    description: `open the search interface`,+    details: `+    This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.+    `,+    examples: [[+      `Open the search window`,+      `yarn search`,+    ]],+  });++  @Command.Path(`search`)+  async execute() {+    const configuration = await Configuration.find(this.context.cwd, this.context.plugins);++    const prettyName = (name: string) => {+      const hasScope = name.includes(`/`);++      if (hasScope) {+        const [scope, descriptor] = name.split(`/`);+        return <>{configuration.format(`${scope}/`, FormatType.SCOPE)}{configuration.format(descriptor, FormatType.NAME)}</>;+      } else {+        return configuration.format(name, FormatType.NAME);+      }+    };++    const Prompt = () => {+      return (+        <Box flexDirection="row">+          <Box flexDirection="column" width={49}>+            <Box marginLeft={1}>+             Press <Color bold cyanBright>{`<up>`}</Color>/<Color bold cyanBright>{`<down>`}</Color> to move between packages.+            </Box>+            <Box marginLeft={1}>+             Press <Color bold cyanBright>{`<space>`}</Color> to select a package.+            </Box>+            <Box marginLeft={1}>+              Press <Color bold cyanBright>{`<space>`}</Color> again to change the target.+            </Box>+          </Box>+          <Box flexDirection="column">+            <Box marginLeft={1}>+              Press <Color bold cyanBright>{`<enter>`}</Color> to install the selected packages.+            </Box>+            <Box marginLeft={1}>+             Press <Color bold cyanBright>{`<ctrl+c>`}</Color> to abort.+            </Box>+          </Box>+        </Box>+      );+    };++    const SearchColumnNames = () => {+      return <>+        <Box width={17}><Color bold underline gray>Owner</Color></Box>+        <Box width={17}><Color bold underline gray>Version</Color></Box>+      </>;+    };++    const SelectedColumnNames = () => {+      return <Box width={17}><Color bold underline gray>Target</Color></Box>;+    };++    const HitEntry = ({hit, active}: {hit: AlgoliaPackage, active: boolean}) => {+      const [action, setAction] = useMinistore<string | null>(hit.name, null);++      useSpace({+        active,+        handler: () => {+          if (!action) {+            setAction(targets[0]);+            return;+          }++          const nextIndex = targets.indexOf(action) + 1;++          if (nextIndex === targets.length) {+            setAction(null);+          } else {+            setAction(targets[nextIndex]);+          }+        },+      });++      return <Box>+        <Box width={45} textWrap="wrap">+          <Text bold>+            {prettyName(hit.name)}+          </Text>+        </Box>+        <Box width={16} textWrap="truncate" marginLeft={1}>+          <Text bold>+            {hit.owner.name}+          </Text>+        </Box>+        <Box width={16} textWrap="truncate" marginLeft={1}>+          {hit.version}+        </Box>+      </Box>;+    };++    const SelectedEntry = ({name, active}: {name: string, active: boolean}) => {+      const [action] = useMinistore<string | null>(name, null);++      return <Box>+        <Box width={47}>+          <Text bold>+            {` - `}{prettyName(name)}+          </Text>+        </Box>+        {targets.map(+          target =>+            <Box key={target} width={14} marginLeft={1}>+              {action === target ? <Color green> ◉ </Color> : <Color yellow> ◯ </Color>}+              <Text bold>{target}</Text>+            </Box>+        )}+      </Box>;+    };++    const SearchApp: SubmitInjectedComponent<Map<string, unknown>> = ({useSubmit}) => {+      const selectionMap = useMinistore();+      useSubmit(selectionMap);++      const selectedPackages = Array.from(selectionMap.keys()).filter(pkg => selectionMap.get(pkg) !== null);++      const [query, setQuery] = useState<string>(``);+      const [page, setPage] = useState(0);+      const [hits, setHits] = useState<Array<AlgoliaPackage>>([]);++      const handleQueryOnChange = (newQuery: string) => {+        // Ignore space and tab clicks+        if (newQuery.match(/\t| /))+          return;++        setQuery(newQuery);+      };++      const fetchHits = async () => {+        setPage(0);++        const res = await search(query);++        if (res.query === query) {+          setHits(res.hits);+        }+      };++      const fetchNextPageHits = async () => {+        const res = await search(query, page + 1);++        if (res.query === query && res.page - 1 === page) {+          setPage(res.page);+          setHits([...hits, ...res.hits]);+        }+      };++      useEffect(() => {+        if (!query) {+          setHits([]);+        } else {+          fetchHits();+        }+      }, [query]);++      // Typescript is having problems with+      // recognizing InkTextInput as a valid+      // JSX element for some reason...+      const TextInput = InkTextInput as unknown as React.ComponentClass<InkTextInputProps>;++      return <Box flexDirection={`column`}>+        <Prompt />+        <Box flexDirection={`row`}>+          <Text bold>Search: </Text>+          <Box width={41}>+            <TextInput+              value={query}+              onChange={handleQueryOnChange}+              placeholder={`i.e. babel, webpack, react...`}+              showCursor={false}+            />+          </Box>+          <SearchColumnNames />+        </Box>+        {hits.length ?+          <ScrollableItems+            radius={2}+            loop={false}+            children={hits.map(hit => <HitEntry key={hit.name} hit={hit} active={false} />)}+            willReachEnd={fetchNextPageHits}+          /> : <Color gray>Start typing...</Color>+        }+        <Box flexDirection={`row`}>+          <Box width={49}>+            <Text bold>Selected:</Text>+          </Box>+          <SelectedColumnNames />+        </Box>+        {selectedPackages.length ?+          selectedPackages.map(+            name => <SelectedEntry key={name} name={name} active={false}/>+          ) : <Color gray>No selected packages...</Color>+        }+      </Box>;+    };++    const installRequests = await renderForm(SearchApp, {});+    if (typeof installRequests === `undefined`)+      return 1;++    const dependencies = Array.from(installRequests.keys()).filter(request => installRequests.get(request) === `regular`);+    const devDependencies = Array.from(installRequests.keys()).filter(request => installRequests.get(request) === `dev`);+    const peerDependencies = Array.from(installRequests.keys()).filter(request => installRequests.get(request) === `peer`);++    await this.cli.run([`add`, ...dependencies]);+    await this.cli.run([`add`, `--dev`, ...devDependencies]);+    await this.cli.run([`add`, `--peer`, ...peerDependencies]);

Let's just hope that nobody publishes a new version in the millisecond between selecting the packages and running yarn add. (So that you expect to install react 16, but suddenly react 17 is published)

After all, there's the same risk of race conditions between the time you make the search on the Yarn website and you run yarn add 😄

20 "build scripts disabled" messages.

Those really should be silenced after the first time. Whether to run them or not is handled within the linkers, which aren't aware of the build state, but it should instead be part of the project builder. This way we would be able to store that we didn't run them purposely.

JureSotosek

comment created time in 4 days

push eventyarnpkg/berry

Maël Nison

commit sha fa406ed0f22fe8b804863821e107e91c820efd9b

Fixes incorrect variable name

view details

push time in 4 days

Pull request review commentyarnpkg/berry

feat(plugin-essentials): add support for glob patterns to yarn remove and yarn up

 export default class RemoveCommand extends BaseCommand {          for (const target of targets) {           const descriptors = workspace.manifest.getForScope(target);-          const stringifiedIdents = [...descriptors.values()].map(structUtils.stringifyIdent);+          const stringifiedIdents = [...descriptors.values()].map(stringifiedIdent => {

Woops my bad! Wouldn't make sense to stringify a stringified ident indeed 😄

paul-soporan

comment created time in 4 days

push eventyarnpkg/berry

Timothy Gu

commit sha beeed874364539032ad4d4362795eb3b1128334f

feat(plugin-compat): add missing jss-plugin-rule-value-function dependency to extensions (#1424) * Add jss-plugin-rule-value-function to extensions See https://github.com/cssinjs/jss/pull/1315. * Versions Co-authored-by: Maël Nison <nison.mael@gmail.com>

view details

push time in 4 days

PR merged yarnpkg/berry

feat(plugin-compat): add missing jss-plugin-rule-value-function dependency to extensions

What's the problem this PR addresses? <!-- Describe the rationale of your PR. --> <!-- Link all issues that it closes. (Closes/Resolves #xxxx.) -->

Installing jss-plugin-rule-value-function doesn't work on Yarn 2 due to missing dependencies.

How did you fix it? <!-- A detailed description of your implementation. -->

Add the missing dependencies to plugin-compat/…/extensions.ts which solves this problem in the short term. See https://github.com/cssinjs/jss/pull/1315..

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. -->

<!-- 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 have verified that all automated PR checks pass.
+28 -0

0 comment

2 changed files

TimothyGu

pr closed time in 4 days

push event7rulnik/berry

Maël Nison

commit sha c281509dde100968588b761b4c77aa9c2594047e

Some refactorings

view details

push time in 4 days

push eventmissing1984/berry

Maël Nison

commit sha 574cd0b20c35690d7d8efba9eb8231be78b47610

Improves support for extra options

view details

push time in 4 days

PR closed yarnpkg/berry

Add support for package exports into .pnp.js

This is just a first iteration, and even then the code is far from finished.

  • This needs a lot more tests & documentation
  • I'd love feedback on the pnp hook code, as this is the first time I'm touching PnP resolution

What's the problem this PR addresses?

Berry doesn't support exports in package.json

#650, #1277

How did you fix it?

This PR currently contains a very basic approach which loads the exports at resolution time, validates the exports and then applies the exports onto the unqualified path to get a new unqualified path. The algorithm has been implemented as per node documentation (https://nodejs.org/api/modules.html#modules_all_together, https://nodejs.org/api/esm.html#esm_resolver_algorithm).

As I noted in https://github.com/yarnpkg/berry/issues/650#issuecomment-619957377, package exports resolution currently fits neither in resolveToUnqualified or resolveUnqualified, so I've placed it into a separate function. Alternatively we could validate the exports at installation time and store it in PnP data. That will result in "invalid metadata" errors at installation time instead of at resolution time (fail fast). It also means one less file system hit per bare import resolution. Finally, it'll make it possible for resolveToUnqualified to handle export mapping.

I'm not 100% happy with the current approach, if only because resolveToUnqualified returns an invalid path for packages that have exports. It feels weird to then go map that onto a valid path.

+249 -7

6 comments

13 changed files

bgotink

pr closed time in 4 days

pull request commentyarnpkg/berry

Add support for package exports into .pnp.js

We've discussed with @bgotink and came to the conclusion that in the current state of things, maybe the best would be to contribute the exports support to the browserify/resolve package, since it's the closest implementation of a "standard" resolver there is at the moment (cc @ljharb).

This way we could remove the qualified path resolution from our codebase, focusing exclusively on bare specifiers.

bgotink

comment created time in 4 days

push eventyarnpkg/berry

Maël Nison

commit sha 494e3c38b9833a8e5034e17e8ad4d95d09c944b5

Only updates PWD if it exists

view details

push time in 4 days

push eventTimothyGu/berry

Maël Nison

commit sha cd2a0c88fac9b44f2e7d34a9919edada5a98d0e4

Versions

view details

push time in 4 days

delete branch yarnpkg/berry

delete branch : merceyz/es2018

delete time in 4 days

more