-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to yarn berry with node linker (#158)
- Loading branch information
Showing
17 changed files
with
11,959 additions
and
8,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# EditorConfig helps developers define and maintain | ||
# consistent coding styles between different editors and IDEs. | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,13 @@ | ||
{ | ||
"extends": ["prettier"], | ||
"plugins": ["prettier"], | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true, | ||
"jasmine": true | ||
}, | ||
"extends": ["prettier"], | ||
"globals": { | ||
"require": true, | ||
"creditcard": true, | ||
"CREDIT_CARDS": true, | ||
"INVALID_CREDIT_CARD": true, | ||
"VALID_CREDIT_CARD": true, | ||
"luhn": true, | ||
"list": true | ||
}, | ||
"rules": { | ||
"camelcase": 2, | ||
"comma-dangle": [2, { | ||
"arrays": "always-multiline", | ||
"objects": "always-multiline", | ||
"imports": "always-multiline", | ||
"exports": "always-multiline", | ||
"functions": "never" | ||
}], | ||
"comma-spacing": 2, | ||
"comma-style": [2, "last"], | ||
"eol-last": 2, | ||
"eqeqeq": 2, | ||
"indent": [2, 2], | ||
"linebreak-style": [2, "unix"], | ||
"max-nested-callbacks": [2, 3], | ||
"no-dupe-keys": 2, | ||
"no-eq-null": 2, | ||
"no-extra-semi": 2, | ||
"no-lonely-if": 2, | ||
"no-multi-spaces": 0, | ||
"no-multiple-empty-lines": [2, {"max": 2}], | ||
"no-nested-ternary": 2, | ||
"no-param-reassign": 2, | ||
"no-self-compare": 2, | ||
"no-throw-literal": 2, | ||
"no-trailing-spaces": 2, | ||
"no-undef": 2, | ||
"no-underscore-dangle": 0, | ||
"no-void": 2, | ||
"one-var": [2, "never"], | ||
"prettier/prettier": "error", | ||
"quotes": [2, "single"], | ||
"semi": [2, "always"], | ||
"keyword-spacing": 2, | ||
"space-before-function-paren": [2, "never"], | ||
"space-in-parens": [2, "never"] | ||
"parserOptions": { | ||
"sourceType": "module" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,72 @@ | ||
# OS | ||
.DS_Store | ||
|
||
# IDEs | ||
.idea | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Yarn | ||
.yarn/* | ||
!.yarn/releases | ||
!.yarn/plugins | ||
.pnp.* | ||
.yarn-integrity | ||
|
||
# npm | ||
.npm | ||
package-lock.json | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# Cache | ||
.cache | ||
|
||
# Build | ||
build | ||
dist | ||
node_modules | ||
npm-debug.log | ||
.coverage | ||
|
||
# Other | ||
*.tgz | ||
*.iml | ||
*.map |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
module.exports = { | ||
printWidth: 80, | ||
arrowParens: 'avoid', | ||
bracketSameLine: true, | ||
bracketSpacing: true, | ||
endOfLine: 'lf', | ||
printWidth: 120, | ||
quoteProps: 'as-needed', | ||
semi: true, | ||
singleQuote: true, | ||
trailingComma: 'es5' | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
useTabs: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable */ | ||
//prettier-ignore | ||
module.exports = { | ||
name: "@yarnpkg/plugin-engines", | ||
factory: function (require) { | ||
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;})(); | ||
return plugin; | ||
} | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
nodeLinker: 'node-modules' | ||
|
||
npmAuthToken: '${{ NPM_TOKEN }}' | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-engines.cjs | ||
spec: 'https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js' | ||
|
||
yarnPath: .yarn/releases/yarn-3.4.1.cjs |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
module.exports = { | ||
coverageDirectory: '.coverage', | ||
collectCoverageFrom: [ | ||
'src/**/*.js', | ||
], | ||
collectCoverageFrom: ['src/**/*.js'], | ||
coverageReporters: ['html', 'lcovonly'], | ||
coverageThreshold: { | ||
global: { | ||
statements: 100, | ||
branches: 100, | ||
functions: 100, | ||
lines: 100 | ||
lines: 100, | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.