Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: remove semver and mkdirp deps and add node17 test #2641

Merged
merged 5 commits into from Nov 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -10,12 +10,10 @@ on:

jobs:
node_tests:
name: 'Test stylus on ${{matrix.os}} with node${{matrix.node}}'
name: 'Test stylus on ${{matrix.os}} with node16'
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Latest four Nodejs LTS version
node: [10, 12, 14, 16]
runs-on: ${{ matrix.os }}
steps:
# Pull repo to test machine
Expand All @@ -24,7 +22,7 @@ jobs:
- uses: actions/setup-node@v2
with:
# The Node.js version to configure
node-version: ${{ matrix.node }}
node-version: '16'
# Caching dependencies to speed up workflows
- name: Get npm cache directory
id: npm-cache-dir
Expand All @@ -43,8 +41,26 @@ jobs:
# Output useful info for debugging.
run: node --version && npm --version
- name: Run Test
run: npm run test

run: npm run test
# Not work currently, need investigate
#- name: Run Test Cov
# run: npm run test-cov

compat_node_tests:
name: 'Compat test stylus on ${{matrix.os}} with node${{matrix.node}}'
strategy:
matrix:
os: [ubuntu-latest]
node: [10, 12, 14, 17]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install npm dependencies
run: npm install
- name: Print put node & npm version
run: node --version && npm --version
- name: Run Test
run: npm run test
3 changes: 1 addition & 2 deletions bin/stylus
Expand Up @@ -12,8 +12,7 @@ var fs = require('fs')
, resolve = require('path').resolve
, join = require('path').join
, isWindows = process.platform === 'win32'
, semver = require('semver')
, mkdirSync = semver.satisfies(process.version, '>=10.12.0') ? fs.mkdirSync : require('mkdirp').sync;
, mkdirSync = fs.mkdirSync;

/**
* Arguments.
Expand Down
3 changes: 1 addition & 2 deletions lib/middleware.js
Expand Up @@ -9,14 +9,13 @@
*/

var stylus = require('./stylus')
, semver = require('semver')
, fs = require('fs')
, url = require('url')
, dirname = require('path').dirname
, join = require('path').join
, sep = require('path').sep
, debug = require('debug')('stylus:middleware')
, mkdir = semver.satisfies(process.version, '>=10.12.0') ? fs.mkdir : require('mkdirp');
, mkdir = fs.mkdir;

/**
* Import map.
Expand Down
10 changes: 0 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -32,10 +32,8 @@
"css": "^3.0.0",
"debug": "~3.1.0",
"glob": "^7.1.6",
"mkdirp": "~1.0.4",
"safer-buffer": "^2.1.2",
"sax": "~1.2.4",
"semver": "^6.3.0",
"source-map": "^0.7.3"
},
"devDependencies": {
Expand Down