From dc3fd774fc5edc7445dc1e8edb7b450168c71383 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Mon, 21 Sep 2020 22:07:34 -0700 Subject: [PATCH] Scaffold: Update repository patterns --- .ci/.azure-pipelines-steps.yml | 38 ++++++++++++++ .ci/.azure-pipelines.yml | 90 ++++++++++++++++++++++++++++++++++ .gitignore | 50 ++++++++++++++++--- .jscsrc | 3 -- .npmrc | 1 + .travis.yml | 1 + README.md | 13 +++-- appveyor.yml | 8 ++- package.json | 22 ++++----- test/file.js | 2 +- 10 files changed, 199 insertions(+), 29 deletions(-) create mode 100644 .ci/.azure-pipelines-steps.yml create mode 100644 .ci/.azure-pipelines.yml delete mode 100644 .jscsrc create mode 100644 .npmrc diff --git a/.ci/.azure-pipelines-steps.yml b/.ci/.azure-pipelines-steps.yml new file mode 100644 index 0000000..894c21e --- /dev/null +++ b/.ci/.azure-pipelines-steps.yml @@ -0,0 +1,38 @@ +steps: +- script: npm i -g npm@$(npm_version) + displayName: Use legacy npm version $(npm_version) + condition: ne(variables['npm_version'], '') + +- task: NodeTool@0 + inputs: + versionSpec: '$(node_version)' + displayName: Use Node $(node_version) + +- script: npm install + displayName: npm install + +- script: npm test + displayName: Run tests + +- script: npm run coveralls + displayName: Run coveralls + env: + # Pretend to be AppVeyor for now + APPVEYOR: true + APPVEYOR_BUILD_NUMBER: $(Build.BuildNumber) + APPVEYOR_BUILD_ID: $(Agent.OS)_$(node_version) + APPVEYOR_REPO_COMMIT: $(Build.SourceVersion) + APPVEYOR_REPO_BRANCH: $(Build.SourceBranchName) + # Overwrite the AppVeyor Service Name + COVERALLS_SERVICE_NAME: Azure Pipelines + COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN_SECRET) + COVERALLS_PARALLEL: true + CI_PULL_REQUEST: $(System.PullRequest.PullRequestNumber) + +- script: npm run azure-pipelines + displayName: Write tests to xml + +- task: PublishTestResults@2 + inputs: + testResultsFiles: '**/test.xunit' + condition: succeededOrFailed() diff --git a/.ci/.azure-pipelines.yml b/.ci/.azure-pipelines.yml new file mode 100644 index 0000000..2d717af --- /dev/null +++ b/.ci/.azure-pipelines.yml @@ -0,0 +1,90 @@ +trigger: +- master +- releases/* + +jobs: + - job: Test_Linux + displayName: Run Tests on Linux + pool: + vmImage: "Ubuntu 16.04" + strategy: + matrix: + Node_v12: + node_version: 12 + Node_v10: + node_version: 10 + Node_v8: + node_version: 8 + Node_v6: + node_version: 6 + Node_v4: + node_version: 4 + Node_v0_12: + node_version: 0.12 + Node_v0_10: + node_version: 0.10 + steps: + - template: .azure-pipelines-steps.yml + + - job: Test_Windows + displayName: Run Tests on Windows + pool: + vmImage: vs2017-win2016 + strategy: + matrix: + Node_v12: + node_version: 12 + Node_v10: + node_version: 10 + Node_v8: + node_version: 8 + Node_v6: + node_version: 6 + Node_v4: + node_version: 4 + npm_version: 2 + Node_v0_12: + node_version: 0.12 + npm_version: 2 + Node_v0_10: + node_version: 0.10 + npm_version: 2 + steps: + - template: .azure-pipelines-steps.yml + + - job: Test_MacOS + displayName: Run Tests on MacOS + pool: + vmImage: macos-10.13 + strategy: + matrix: + Node_v12: + node_version: 12 + Node_v10: + node_version: 10 + Node_v8: + node_version: 8 + Node_v6: + node_version: 6 + Node_v4: + node_version: 4 + Node_v0_12: + node_version: 0.12 + Node_v0_10: + node_version: 0.10 + steps: + - template: .azure-pipelines-steps.yml + + - job: Notify_Coveralls + displayName: Notify Coveralls that the parallel report is done + pool: + vmImage: "Ubuntu 16.04" + dependsOn: + - Test_Linux + - Test_Windows + - Test_MacOS + steps: + - script: curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$BUILD_NAME&payload[status]=done" + env: + COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN_SECRET) + BUILD_NAME: $(Build.BuildNumber) diff --git a/.gitignore b/.gitignore index 6f63646..58a757a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,15 @@ # Logs logs *.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* # Runtime data pids *.pid *.seed +*.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov @@ -13,19 +17,51 @@ lib-cov # Coverage directory used by tools like istanbul coverage +# nyc test coverage +.nyc_output + # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt -# Compiled binary addons (http://nodejs.org/api/addons.html) +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) build/Release -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules +# Dependency directories +node_modules/ +jspm_packages/ -# Users Environment Variables -.lock-wscript +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next # Garbage files .DS_Store + +# Test results +test.xunit diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index 703b33f..0000000 --- a/.jscsrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "preset": "gulp" -} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/.travis.yml b/.travis.yml index 7e14b19..eda5b00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ sudo: false language: node_js node_js: + - '12' - '10' - '8' - '6' diff --git a/README.md b/README.md index 8876a9b..40492a3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # vinyl -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] Virtual file format. @@ -432,18 +432,21 @@ MIT [vinyl-fs]: https://github.com/gulpjs/vinyl-fs [cloneable-readable]: https://github.com/mcollina/cloneable-readable -[downloads-image]: http://img.shields.io/npm/dm/vinyl.svg +[downloads-image]: https://img.shields.io/npm/dm/vinyl.svg [npm-url]: https://www.npmjs.com/package/vinyl -[npm-image]: http://img.shields.io/npm/v/vinyl.svg +[npm-image]: https://img.shields.io/npm/v/vinyl.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=$PROJECT_ID&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/vinyl?branchName=master [travis-url]: https://travis-ci.org/gulpjs/vinyl -[travis-image]: http://img.shields.io/travis/gulpjs/vinyl.svg?label=travis-ci +[travis-image]: https://img.shields.io/travis/gulpjs/vinyl.svg?label=travis-ci [appveyor-url]: https://ci.appveyor.com/project/gulpjs/vinyl [appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/vinyl.svg?label=appveyor [coveralls-url]: https://coveralls.io/r/gulpjs/vinyl -[coveralls-image]: http://img.shields.io/coveralls/gulpjs/vinyl/master.svg +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/vinyl/master.svg [gitter-url]: https://gitter.im/gulpjs/gulp [gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/appveyor.yml b/appveyor.yml index bd65027..47b3ca2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,9 +10,15 @@ environment: - nodejs_version: "6" - nodejs_version: "8" - nodejs_version: "10" + - nodejs_version: "12" + +platform: + - x86 + - x64 install: - - ps: Install-Product node $env:nodejs_version + # https://www.appveyor.com/docs/lang/nodejs-iojs/#installing-any-version-of-nodejs-or-iojs + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) $env:PLATFORM - npm install test_script: diff --git a/package.json b/package.json index 264e6f1..15cb1a4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vinyl", "version": "2.2.0", "description": "Virtual file format.", - "author": "Gulp Team (http://gulpjs.com/)", + "author": "Gulp Team (https://gulpjs.com/)", "contributors": [ "Eric Schoffstall ", "Blaine Bublitz " @@ -19,11 +19,11 @@ "lib" ], "scripts": { - "lint": "eslint . && jscs index.js lib/ test/", + "lint": "eslint .", "pretest": "npm run lint", - "test": "mocha --async-only", - "cover": "istanbul cover _mocha --report lcovonly", - "coveralls": "npm run cover && istanbul-coveralls" + "test": "nyc mocha --async-only", + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls" }, "dependencies": { "clone": "^2.1.1", @@ -34,15 +34,13 @@ "replace-ext": "^1.0.0" }, "devDependencies": { - "eslint": "^1.7.3", - "eslint-config-gulp": "^2.0.0", + "coveralls": "github:phated/node-coveralls#2.x", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", "expect": "^1.20.2", - "istanbul": "^0.4.3", - "istanbul-coveralls": "^1.0.3", - "jscs": "^2.3.5", - "jscs-preset-gulp": "^1.0.0", "mississippi": "^1.2.0", - "mocha": "^2.4.5", + "mocha": "^3.0.0", + "nyc": "^10.3.2", "safer-buffer": "^2.1.2" }, "keywords": [ diff --git a/test/file.js b/test/file.js index 2a4636c..a71bb08 100644 --- a/test/file.js +++ b/test/file.js @@ -1205,7 +1205,7 @@ describe('File', function() { var file = new File(); function invalid() { - a = file.basename; + var a = file.basename; } expect(invalid).toThrow('No path specified! Can not get basename.');