diff --git a/.ci/.azure-pipelines-steps.yml b/.ci/.azure-pipelines-steps.yml index b54ea9b..59369c3 100644 --- a/.ci/.azure-pipelines-steps.yml +++ b/.ci/.azure-pipelines-steps.yml @@ -1,4 +1,8 @@ steps: +- script: npm i -g npm@$(npm_version) + displayName: Use non-broken npm version $(npm_version) + condition: ne(variables['npm_version'], '') + - task: NodeTool@0 inputs: versionSpec: '$(node_version)' @@ -13,14 +17,10 @@ steps: - 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_SERVICE_NUMBER: $(Build.BuildNumber) + COVERALLS_SERVICE_JOB_ID: "$(Agent.OS)_$(node_version)" + COVERALLS_GIT_BRANCH: $(Build.SourceBranchName) COVERALLS_REPO_TOKEN: $(COVERALLS_REPO_TOKEN_SECRET) COVERALLS_PARALLEL: true CI_PULL_REQUEST: $(System.PullRequest.PullRequestNumber) diff --git a/.ci/.azure-pipelines.yml b/.ci/.azure-pipelines.yml index 9294859..195683a 100644 --- a/.ci/.azure-pipelines.yml +++ b/.ci/.azure-pipelines.yml @@ -21,13 +21,15 @@ jobs: - job: Test_Windows displayName: Run Tests on Windows pool: - vmImage: vs2017-win2016 + vmImage: "windows-2019" strategy: matrix: Node_v10: node_version: 10 + npm_version: 6.4.1 Node_v8: node_version: 8 + npm_version: 6.4.1 Node_v6: node_version: 6 steps: @@ -36,7 +38,7 @@ jobs: - job: Test_MacOS displayName: Run Tests on MacOS pool: - vmImage: macos-10.13 + vmImage: "macOS-10.15" strategy: matrix: Node_v10: diff --git a/appveyor.yml b/appveyor.yml index 8ead79d..f6cfcfb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,7 @@ environment: install: - ps: Install-Product node $env:nodejs_version + - npm install -g npm@6.4.1 - npm install test_script: diff --git a/index.js b/index.js index 2ded6ea..789dbbf 100644 --- a/index.js +++ b/index.js @@ -8,7 +8,7 @@ var slash = '/'; var backslash = /\\/g; var enclosure = /[\{\[].*[\/]*.*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g; +var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; /** * @param {string} str diff --git a/package.json b/package.json index 0f7ec23..1dfd6bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "glob-parent", - "version": "5.1.0", + "version": "5.1.1", "description": "Extract the non-magic parent path from a glob string.", "author": "Gulp Team (https://gulpjs.com/)", "contributors": [ @@ -28,7 +28,7 @@ "is-glob": "^4.0.1" }, "devDependencies": { - "coveralls": "github:phated/node-coveralls#2.x", + "coveralls": "^3.0.11", "eslint": "^2.13.1", "eslint-config-gulp": "^3.0.1", "expect": "^1.20.2", diff --git a/test/index.test.js b/test/index.test.js index d3e7a71..c13bf04 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -78,6 +78,7 @@ describe('glob-parent', function() { assert.equal(gp('[bar]/'), '.'); assert.equal(gp('./\\[bar]'), './[bar]'); assert.equal(gp('\\[bar]/'), '[bar]'); + assert.equal(gp('\\!dir/*'), '!dir'); assert.equal(gp('[bar\\]/'), '.'); assert.equal(gp('path/foo \\[bar]/'), 'path/foo [bar]'); assert.equal(gp('path/\\{foo,bar}/'), 'path/{foo,bar}');