Skip to content

Commit

Permalink
feat: yarn v2 support and workspaces alt config
Browse files Browse the repository at this point in the history
Typescript 'dom' compiler option is required by transitive
dependency @yarnpkg/core introduced by yarn v2 feature.
Fix type issue with setInterval cause by dom compiler option.
  • Loading branch information
gitphill committed Jul 1, 2020
1 parent 09e0e31 commit 3a1ac38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -82,7 +82,7 @@
"snyk-gradle-plugin": "3.5.1",
"snyk-module": "3.1.0",
"snyk-mvn-plugin": "2.17.1",
"snyk-nodejs-lockfile-parser": "1.22.0",
"snyk-nodejs-lockfile-parser": "1.25.0",
"snyk-nuget-plugin": "1.18.1",
"snyk-php-plugin": "1.9.0",
"snyk-policy": "1.14.1",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/spinner.ts
Expand Up @@ -91,15 +91,15 @@ function spinner(opt: SpinnerOptions) {

let delay = typeof opt.delay === 'number' ? opt.delay : 2;

const interval = setInterval(() => {
const interval = (setInterval(() => {
if (--delay >= 0) {
return;
}
s = ++s % sprite.length;
const c = sprite[s];
str.write(c + ' ' + (opt.label || '') + CR);
wrote = true;
}, ms);
}, ms) as unknown) as NodeJS.Timer;

const unref = typeof opt.unref === 'boolean' ? opt.unref : true;
if (unref && typeof interval.unref === 'function') {
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -5,6 +5,7 @@
"target": "es2017",
"lib": [
"es2017",
"dom"
],
"module": "commonjs",
"allowJs": true,
Expand Down

0 comments on commit 3a1ac38

Please sign in to comment.