diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f455517a..7cede0ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,8 +2,6 @@ name: CI on: - push - pull_request -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true jobs: test: name: Node.js ${{ matrix.node-version }} on ${{ matrix.os }} diff --git a/package-lock.json b/package-lock.json index aab7c340..a50d8907 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "shelljs", - "version": "0.9.1", + "version": "0.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "shelljs", - "version": "0.9.1", + "version": "0.9.2", "license": "BSD-3-Clause", "dependencies": { "execa": "^1.0.0", diff --git a/package.json b/package.json index d6e8c016..732ef887 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shelljs", - "version": "0.9.1", + "version": "0.9.2", "description": "Portable Unix shell commands for Node.js", "keywords": [ "shelljs", @@ -29,6 +29,8 @@ "./global.js": "./global.js", "./make": "./make.js", "./make.js": "./make.js", + "./package": "./package.json", + "./package.json": "./package.json", "./plugin": "./plugin.js", "./plugin.js": "./plugin.js" }, diff --git a/test/config.js b/test/config.js index 30ee84e6..b505a643 100644 --- a/test/config.js +++ b/test/config.js @@ -84,6 +84,42 @@ test('config.globOptions expands directories by default', t => { t.deepEqual(result, expected); }); +test('config.globOptions handles non-wildcards by default', t => { + const result = common.expand(['test/resources/a.txt']); + const expected = [ + 'test/resources/a.txt', + ]; + t.deepEqual(result, expected); +}); + +test('config.globOptions expands "?" symbol by default', t => { + const result = common.expand(['test/resources/file?.t*']); + const expected = [ + 'test/resources/file1.txt', + 'test/resources/file2.txt', + ]; + t.deepEqual(result, expected); +}); + +test('config.globOptions expands "*" in multiple path segments by default', t => { + const result = common.expand(['test/r*sources/file?.txt']); + const expected = [ + 'test/resources/file1.txt', + 'test/resources/file2.txt', + ]; + t.deepEqual(result, expected); +}); + +// https://github.com/shelljs/shelljs/issues/1197 +test.skip('config.globOptions expands "?" in folder path by default', t => { + const result = common.expand(['test/r?sources/file*.txt']); + const expected = [ + 'test/resources/file1.txt', + 'test/resources/file2.txt', + ]; + t.deepEqual(result, expected); +}); + test('config.globOptions respects cwd', t => { // Both node-glob and fast-glob call this option 'cwd'. shell.config.globOptions = { cwd: 'test' };