Skip to content

Commit ff5060a

Browse files
committed
chore: migrate to yarn berry with node linker (#158)
1 parent 830f8d3 commit ff5060a

File tree

17 files changed

+11959
-8168
lines changed

17 files changed

+11959
-8168
lines changed

.editorconfig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# EditorConfig helps developers define and maintain
2-
# consistent coding styles between different editors and IDEs.
3-
41
root = true
52

63
[*]
7-
end_of_line = lf
84
charset = utf-8
9-
trim_trailing_whitespace = true
10-
insert_final_newline = true
11-
indent_style = space
5+
end_of_line = lf
126
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,13 @@
11
{
2+
"extends": ["prettier"],
23
"plugins": ["prettier"],
3-
"parserOptions": {
4-
"sourceType": "module"
5-
},
64
"env": {
75
"es6": true,
86
"browser": true,
97
"node": true,
108
"jasmine": true
119
},
12-
"extends": ["prettier"],
13-
"globals": {
14-
"require": true,
15-
"creditcard": true,
16-
"CREDIT_CARDS": true,
17-
"INVALID_CREDIT_CARD": true,
18-
"VALID_CREDIT_CARD": true,
19-
"luhn": true,
20-
"list": true
21-
},
22-
"rules": {
23-
"camelcase": 2,
24-
"comma-dangle": [2, {
25-
"arrays": "always-multiline",
26-
"objects": "always-multiline",
27-
"imports": "always-multiline",
28-
"exports": "always-multiline",
29-
"functions": "never"
30-
}],
31-
"comma-spacing": 2,
32-
"comma-style": [2, "last"],
33-
"eol-last": 2,
34-
"eqeqeq": 2,
35-
"indent": [2, 2],
36-
"linebreak-style": [2, "unix"],
37-
"max-nested-callbacks": [2, 3],
38-
"no-dupe-keys": 2,
39-
"no-eq-null": 2,
40-
"no-extra-semi": 2,
41-
"no-lonely-if": 2,
42-
"no-multi-spaces": 0,
43-
"no-multiple-empty-lines": [2, {"max": 2}],
44-
"no-nested-ternary": 2,
45-
"no-param-reassign": 2,
46-
"no-self-compare": 2,
47-
"no-throw-literal": 2,
48-
"no-trailing-spaces": 2,
49-
"no-undef": 2,
50-
"no-underscore-dangle": 0,
51-
"no-void": 2,
52-
"one-var": [2, "never"],
53-
"prettier/prettier": "error",
54-
"quotes": [2, "single"],
55-
"semi": [2, "always"],
56-
"keyword-spacing": 2,
57-
"space-before-function-paren": [2, "never"],
58-
"space-in-parens": [2, "never"]
10+
"parserOptions": {
11+
"sourceType": "module"
5912
}
6013
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Use Node.js
1313
uses: actions/setup-node@v2
1414
with:
15-
node-version: '14.x'
15+
node-version: '18.x'
1616

1717
- name: Install dependencies
1818
run: yarn

.github/workflows/deploy-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Setup Node
3636
uses: actions/setup-node@v2
3737
with:
38-
node-version: '14.x'
38+
node-version: '18.x'
3939
registry-url: 'https://registry.npmjs.org'
4040

4141
# Cache dependencies

.gitignore

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,72 @@
1+
# OS
2+
.DS_Store
3+
4+
# IDEs
5+
.idea
6+
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
lerna-debug.log*
14+
15+
# Diagnostic reports (https://nodejs.org/api/report.html)
16+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
17+
18+
# Runtime data
19+
pids
20+
*.pid
21+
*.seed
22+
*.pid.lock
23+
24+
# Directory for instrumented libs generated by jscoverage/JSCover
25+
lib-cov
26+
27+
# Coverage directory used by tools like istanbul
28+
coverage
29+
*.lcov
30+
31+
# nyc test coverage
32+
.nyc_output
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Dependency directories
38+
node_modules/
39+
jspm_packages/
40+
41+
# Optional eslint cache
42+
.eslintcache
43+
44+
# Optional REPL history
45+
.node_repl_history
46+
47+
# Yarn
48+
.yarn/*
49+
!.yarn/releases
50+
!.yarn/plugins
51+
.pnp.*
52+
.yarn-integrity
53+
54+
# npm
55+
.npm
56+
package-lock.json
57+
58+
# dotenv environment variables file
59+
.env
60+
.env.test
61+
62+
# Cache
63+
.cache
64+
65+
# Build
66+
build
167
dist
2-
node_modules
3-
npm-debug.log
4-
.coverage
68+
69+
# Other
70+
*.tgz
71+
*.iml
72+
*.map

.npmignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

.prettierrc.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
module.exports = {
2-
printWidth: 80,
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
4+
bracketSpacing: true,
5+
endOfLine: 'lf',
6+
printWidth: 120,
7+
quoteProps: 'as-needed',
8+
semi: true,
39
singleQuote: true,
4-
trailingComma: 'es5'
10+
tabWidth: 2,
11+
trailingComma: 'all',
12+
useTabs: false,
513
};
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-engines",
5+
factory: function (require) {
6+
var plugin=(()=>{var P=Object.create,f=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var b=n=>f(n,"__esModule",{value:!0});var i=n=>{if(typeof require!="undefined")return require(n);throw new Error('Dynamic require of "'+n+'" is not supported')};var T=(n,e)=>{for(var r in e)f(n,r,{get:e[r],enumerable:!0})},V=(n,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of N(e))!Y.call(n,t)&&t!=="default"&&f(n,t,{get:()=>e[t],enumerable:!(r=R(e,t))||r.enumerable});return n},s=n=>V(b(f(n!=null?P(j(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var U={};T(U,{default:()=>q});var o=s(i("@yarnpkg/core")),c;(function(r){r.Yarn="Yarn",r.Console="Console"})(c||(c={}));var h=class{constructor(e){this.throwWrongEngineError=(e,r)=>{let t=this.formatErrorMessage(e,r);this.throwError(t)};this.throwError=e=>{switch(this.errorReporter){case c.Yarn:this.reportYarnError(e);break;case c.Console:default:this.reportConsoleError(e);break}};this.reportYarnError=e=>{throw new o.ReportError(o.MessageName.UNNAMED,e)};this.reportConsoleError=e=>{console.error(e),process.exit(1)};this.formatErrorMessage=(e,r)=>{let{configuration:t}=this.project,p=o.formatUtils.applyStyle(t,o.formatUtils.pretty(t,this.engine,"green"),2),g=o.formatUtils.pretty(t,e,"cyan"),d=o.formatUtils.pretty(t,r,"cyan"),w=`The current ${p} version ${g} does not satisfy the required version ${d}.`;return o.formatUtils.pretty(t,w,"red")};this.project=e.project,this.errorReporter=e.errorReporter}};var m=s(i("fs")),y=s(i("path")),l=s(i("semver")),k=s(i("@yarnpkg/fslib")),a=s(i("@yarnpkg/core"));var v=class extends h{constructor(){super(...arguments);this.resolveNvmRequiredVersion=()=>{let{configuration:e,cwd:r}=this.project,t=(0,y.resolve)(k.npath.fromPortablePath(r),".nvmrc"),p=a.formatUtils.applyStyle(e,a.formatUtils.pretty(e,this.engine,"green"),2);if(!(0,m.existsSync)(t)){this.throwError(a.formatUtils.pretty(e,`Unable to verify the ${p} version. The .nvmrc file does not exist.`,"red"));return}let g=(0,m.readFileSync)(t,"utf-8").trim();if((0,l.validRange)(g))return g;let d=a.formatUtils.pretty(e,".nvmrc","yellow");this.throwError(a.formatUtils.pretty(e,`Unable to verify the ${p} version. The ${d} file contains an invalid semver range.`,"red"))}}get engine(){return"Node"}verifyEngine(e){let r=e.node;r!=null&&(r===".nvmrc"&&(r=this.resolveNvmRequiredVersion()),(0,l.satisfies)(process.version,r,{includePrerelease:!0})||this.throwWrongEngineError(process.version.replace(/^v/i,""),r.replace(/^v/i,"")))}};var x=s(i("semver")),E=s(i("@yarnpkg/core"));var u=class extends h{get engine(){return"Yarn"}verifyEngine(e){let r=e.yarn;r!=null&&((0,x.satisfies)(E.YarnVersion,r,{includePrerelease:!0})||this.throwWrongEngineError(E.YarnVersion,r))}};var C=n=>e=>{if(process.env.PLUGIN_YARN_ENGINES_DISABLE!=null)return;let{engines:r={}}=e.getWorkspaceByCwd(e.cwd).manifest.raw,t={project:e,errorReporter:n};[new v(t),new u(t)].forEach(g=>g.verifyEngine(r))},S={hooks:{validateProject:C(c.Yarn),setupScriptEnvironment:C(c.Console)}},q=S;return U;})();
7+
return plugin;
8+
}
9+
};

.yarn/releases/yarn-3.4.1.cjs

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

0 commit comments

Comments
 (0)