-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Replace request dependency to fix security issue in the node e…
…nabler (#3909) Signed-off-by: Pavel Jareš <[email protected]> Signed-off-by: nx673747 <[email protected]> Signed-off-by: ac892247 <[email protected]> Co-authored-by: nx673747 <[email protected]> Co-authored-by: ac892247 <[email protected]>
- Loading branch information
1 parent
77f0d91
commit cc30d21
Showing
33 changed files
with
11,915 additions
and
394 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,3 @@ | ||
{ | ||
"presets": ["env"] | ||
} |
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,10 @@ | ||
{ | ||
"extends": ["airbnb-base"], | ||
"rules": { | ||
"no-param-reassign": [2, {"props": false}], | ||
"consistent-return": 0 | ||
}, | ||
"env": { | ||
"mocha": true | ||
} | ||
} |
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,2 +1,2 @@ | ||
legacy-peer-deps=true | ||
registry=https://zowe.jfrog.io/artifactory/api/npm/npm-org/ | ||
registry=https://zowe.jfrog.io/artifactory/api/npm/npm-org |
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,64 @@ | ||
/* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Copyright Contributors to the Zowe Project. | ||
*/ | ||
|
||
import gulp from 'gulp'; | ||
import babel from 'gulp-babel'; | ||
import mocha from 'gulp-mocha'; | ||
import eslint from 'gulp-eslint'; | ||
import { Instrumenter } from 'babel-istanbul'; | ||
import istanbul from 'gulp-istanbul'; | ||
import env from 'gulp-env'; | ||
|
||
gulp.task('build', () => ( | ||
gulp.src('src/**/*.js') | ||
.pipe(babel()) | ||
.pipe(gulp.dest('lib')) | ||
)); | ||
|
||
gulp.task('lint', () => ( | ||
gulp.src(['src/**/*.js', 'test/**/*.js']) | ||
.pipe(eslint()) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failOnError()) | ||
)); | ||
|
||
gulp.task('mocha', (cb) => { | ||
const envs = env.set({ | ||
NODE_ENV: 'test', | ||
}); | ||
|
||
return gulp.src('src/**/*.js') | ||
.pipe(envs) | ||
.pipe(istanbul({ | ||
instrumenter: Instrumenter, | ||
})) // Covering files | ||
.pipe(istanbul.hookRequire()) // Force `require` to return covered files | ||
.on('finish', () => { | ||
gulp.src(['test/**/*.js', '!test/integration.test.js']) | ||
.pipe(mocha()) | ||
.pipe(istanbul.writeReports()) | ||
.pipe(istanbul.enforceThresholds({ thresholds: { global: 0 } })) | ||
.pipe(envs.reset) | ||
.on('end', cb); | ||
}); | ||
}); | ||
|
||
gulp.task('test:integration', () => ( | ||
gulp.src('test/integration.test.js') | ||
.pipe(mocha({ timeout: 120000 })) | ||
)); | ||
|
||
gulp.task('test', gulp.series('lint', 'mocha')); | ||
|
||
gulp.task('test:watch', () => ( | ||
gulp.watch(['src/**/*.js', 'test/**/*.test.js'], ['test']) | ||
)); | ||
|
||
gulp.task('default', gulp.series('build')); |
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,16 @@ | ||
{ | ||
"license": "../.licence/EPL-2.0-licence-header.txt", | ||
"licenseFormats": { | ||
"ts|js": { | ||
"prepend": "/*", | ||
"append": " */\n", | ||
"eachLine": { | ||
"prepend": " * " | ||
} | ||
} | ||
}, | ||
"ignore": [ | ||
"bin", "lib", "coverage", | ||
".*", "*.md", "*.gradle", "**/*.yml" | ||
] | ||
} |
Oops, something went wrong.