-
Nick Lanam authored
Summary: This is a [complicated topic](https://yarnpkg.com/getting-started/migration#switching-to-plugnplay). In short, Yarn can now replace `node_modules` with a virtual filesystem introspecting `.zip` files. This has many benefits, but it takes some work to enable. Prerequisites: - D8919: Namespaced absolute imports - Changed `node_modules` references out for `require.resolve` and `yarn run ...` - Made other references more explicit / less ambiguous - Made some dependencies explicit instead of transitive Enabling Plug n' Play (PnP): - `.yarnrc.yml` was updated to actually turn PnP on. - `yarn install` - This created `.pnp.js` and deleted `node_modules` (in favor of `.yarn/cache`). Supporting the change: - Updated ignore files, lint files, Bazel files, etc. - Enabled [Yarn's SDK](https://yarnpkg.com/getting-started/editor-sdks) to support VS Code go-to-definition - Rewrote the Python license checker to be in JS, so that `yarn pnpify` could trick it into not needing to know PnP exists at all. Confirmed working: - Unit tests, webpack build/run, VS Code integration, IntelliJ IDEA integration - Format of new license checker (it's the same logic in another language; dropped it into `configurables/private` to make sure it matched the expected format) - Dev cluster deploy, OSS auth, Jenkins - Snyk (`snyk test --dev --strict-out-of-sync=false`) Test Plan: `yarn install && yarn dev`. `yarn test`. Installation, build, and test should all be even faster than they became with the Yarn v2 update. Jenkins should still be happy and deploys should still work. Reviewers: #third_party_approvers, michelle, vihang Reviewed By: #third_party_approvers, vihang JIRA Issues: PC-1020 Differential Revision: https://phab.corp.pixielabs.ai/D8912 GitOrigin-RevId: f613830ce15d39e915d75330b9375d5e9682122b
cd4f6ded