Skip to content

Commit b95f478

Browse files
committed
Switch to v3 + add allow-scripts
This commit aligns this repo with our module template.
1 parent 4888f60 commit b95f478

File tree

7 files changed

+4868
-1963
lines changed

7 files changed

+4868
-1963
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
*.tgz
22
dist/
33
node_modules/
4+
5+
# yarn v3 (w/o zero-install)
6+
# See: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
7+
.pnp.*
8+
.yarn/*
9+
!.yarn/patches
10+
!.yarn/plugins
11+
!.yarn/releases
12+
!.yarn/sdks
13+
!.yarn/versions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-disable */
2+
//prettier-ignore
3+
module.exports = {
4+
name: "@yarnpkg/plugin-allow-scripts",
5+
factory: function (require) {
6+
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;})();
7+
return plugin;
8+
}
9+
};

.yarn/plugins/@yarnpkg/plugin-constraints.cjs

Lines changed: 52 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.2.1.cjs

Lines changed: 786 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
enableScripts: false
2+
3+
enableTelemetry: 0
4+
5+
logFilters:
6+
- code: YN0004
7+
level: discard
8+
9+
nodeLinker: node-modules
10+
11+
plugins:
12+
- path: .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs
13+
spec: "https://raw.githubusercontent.com/LavaMoat/LavaMoat/main/packages/yarn-plugin-allow-scripts/bundles/@yarnpkg/plugin-allow-scripts.js"
14+
- path: .yarn/plugins/@yarnpkg/plugin-constraints.cjs
15+
spec: "@yarnpkg/plugin-constraints"
16+
17+
yarnPath: .yarn/releases/yarn-3.2.1.cjs

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
},
3636
"homepage": "https://github.com/MetaMask/etherscan-link#readme",
3737
"devDependencies": {
38+
"@lavamoat/allow-scripts": "^2.3.1",
39+
"@lavamoat/preinstall-always-fail": "^1.0.0",
3840
"@metamask/eslint-config": "^5.0.0",
3941
"@typescript-eslint/eslint-plugin": "^4.14.2",
4042
"@typescript-eslint/parser": "^4.14.2",
@@ -44,5 +46,11 @@
4446
"eslint-plugin-node": "^11.1.0",
4547
"mocha": "^7.1.1",
4648
"typescript": "^4.0.5"
49+
},
50+
"packageManager": "[email protected]",
51+
"lavamoat": {
52+
"allowScripts": {
53+
"@lavamoat/preinstall-always-fail": false
54+
}
4755
}
4856
}

0 commit comments

Comments
 (0)