From c271173d8e9c6956d56282b779c110fd761c324c Mon Sep 17 00:00:00 2001 From: Vlad Filippov Date: Sat, 13 Mar 2021 15:41:28 -0500 Subject: [PATCH] Update deps, switch to actions (#141) * Update deps, switch to actions * Fix actions dir * Use npm i for actions --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 6 ------ appveyor.yml | 37 ------------------------------------ bin/grunt | 38 +++++++++++++++++++------------------ package.json | 4 ++-- 5 files changed, 61 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a90a190 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: Tests + +on: [push, pull_request] + +env: + FORCE_COLOR: 2 + +jobs: + run: + name: Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node: [10, 12, 14] + os: [ubuntu-latest, windows-latest] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + + - name: Install npm dependencies + run: npm i + + - name: Run tests + run: npm test + + # We test multiple Windows shells because of prior stdout buffering issues + # filed against Grunt. https://github.com/joyent/node/issues/3584 + - name: Run PowerShell tests + run: "npm test # PowerShell" # Pass comment to PS for easier debugging + shell: powershell + if: startsWith(matrix.os, 'windows') diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8499208..0000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -sudo: false -language: node_js -node_js: - - '8' - - '10' - - '12' diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 48959c2..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,37 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml - -clone_depth: 10 - -version: "{build}" - -# What combinations to test -environment: - matrix: - - nodejs_version: "8" - platform: x86 - - nodejs_version: "10" - platform: x86 - - nodejs_version: "12" - platform: x64 - - nodejs_version: "12" - platform: x86 - -install: - - ps: Install-Product node $env:nodejs_version $env:platform - - npm install - -test_script: - # Output useful info for debugging - - node --version && npm --version - # We test multiple Windows shells because of prior stdout buffering issues - # filed against Grunt. https://github.com/joyent/node/issues/3584 - - ps: "npm test # PowerShell" # Pass comment to PS for easier debugging - - cmd: npm test - -build: off - -matrix: - fast_finish: true - -cache: - - node_modules -> package.json diff --git a/bin/grunt b/bin/grunt index 3186e44..cfc99d8 100755 --- a/bin/grunt +++ b/bin/grunt @@ -4,7 +4,7 @@ process.title = 'grunt'; -var Liftoff = require('liftoff'); +var Liftup = require('liftup'); var v8flags = require('v8flags'); var extensions = require('interpret').jsVariants; var nopt = require('nopt'); @@ -35,7 +35,7 @@ if ('completion' in options) { } v8flags(function (err, v8flags) { - var Grunt = new Liftoff({ + var Grunt = new Liftup({ name: 'grunt', configName: 'Gruntfile', // Support a number of languages based on file extension @@ -43,27 +43,29 @@ v8flags(function (err, v8flags) { // Flags that are v8 flags will be loaded into node instead of Gruntfile v8flags: v8flags }); - Grunt.launch({ + Grunt.prepare({ cwd: options.base, configPath: options.gruntfile, require: options.require, verbose: options.verbose }, function (env) { - var tasks = options.argv.remain; - delete options.argv; - // No grunt install found! - if (!env.modulePath) { - if (options.version) { - process.exit(); + Grunt.execute(env, function(env) { + var tasks = options.argv.remain; + delete options.argv; + // No grunt install found! + if (!env.modulePath) { + if (options.version) { + process.exit(); + } + if (options.help) { + info.help(); + } + info.fatal('Unable to find local grunt.', 99); + } else { + options.gruntfile = env.configPath; + var grunt = require(env.modulePath); + grunt.tasks(tasks, options); } - if (options.help) { - info.help(); - } - info.fatal('Unable to find local grunt.', 99); - } else { - options.gruntfile = env.configPath; - var grunt = require(env.modulePath); - grunt.tasks(tasks, options); - } + }); }); }); diff --git a/package.json b/package.json index ef276b1..35ecd1e 100644 --- a/package.json +++ b/package.json @@ -17,13 +17,13 @@ "dependencies": { "grunt-known-options": "~1.1.1", "interpret": "~1.1.0", - "liftoff": "~2.5.0", + "liftup": "~3.0.1", "nopt": "~4.0.1", "v8flags": "~3.2.0" }, "devDependencies": { "grunt": "~1.3.0", - "grunt-contrib-jshint": "~2.1.0" + "grunt-contrib-jshint": "~3.0.0" }, "files": [ "bin",