Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Yarn v1 to Yarn v3 #846

Merged
merged 5 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Replace plugin with "official" version
The plugin has been reinstalled from the LavaMoat repository. Comments
have also been removed from the `.yarnrc.yml` file.
  • Loading branch information
Gudahtt committed Jun 23, 2022
commit 57696eaad475f83804800bc4a95cee77caf48db1
9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable */
//prettier-ignore
module.exports = {
name: "@yarnpkg/plugin-allow-scripts",
factory: function (require) {
var plugin=(()=>{var a=Object.create,l=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var u=e=>l(e,"__esModule",{value:!0});var f=e=>{if(typeof require!="undefined")return require(e);throw new Error('Dynamic require of "'+e+'" is not supported')};var g=(e,o)=>{for(var r in o)l(e,r,{get:o[r],enumerable:!0})},m=(e,o,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of s(o))!c.call(e,t)&&t!=="default"&&l(e,t,{get:()=>o[t],enumerable:!(r=i(o,t))||r.enumerable});return e},x=e=>m(u(l(e!=null?a(p(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var k={};g(k,{default:()=>d});var n=x(f("@yarnpkg/shell")),y={hooks:{afterAllInstalled:async()=>{let e=await(0,n.execute)("yarn run allow-scripts");e!==0&&process.exit(e)}}},d=y;return k;})();
return plugin;
}
};
18 changes: 0 additions & 18 deletions .yarn/plugins/plugin-allow-scripts.cjs

This file was deleted.

10 changes: 2 additions & 8 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# We use allow-scripts to manually enable scripts and then run them
enableScripts: false

# This ignores the warnings caused by `enableScripts`
logFilters:
- code: YN0004
level: discard

# This ensures Yarn still uses a `node_modules` directory, which is required
# right now for TypeScript to find @types/* packages
nodeLinker: node-modules

plugins:
# This plugin runs `allow-scripts` automatically after install
# TODO: migrate to the "official" version of this plugin: https://github.com/LavaMoat/LavaMoat/pull/345
- path: .yarn/plugins/plugin-allow-scripts.cjs
spec: plugin-allow-scripts.js
- path: .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs
spec: "https://raw.githubusercontent.com/LavaMoat/LavaMoat/main/packages/yarn-plugin-allow-scripts/bundles/@yarnpkg/plugin-allow-scripts.js"

yarnPath: .yarn/releases/yarn-3.2.1.cjs