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

Update dependencies and drop Node.js < 18 support #18

Merged
merged 3 commits into from
Apr 10, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: CI
on:
push:
branches:
- "**"
- "!dependabot/**"
- "main"
pull_request:
workflow_dispatch:

Expand All @@ -23,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [14, 16, 18, 20]
node: [18, 20]

steps:
- name: Clone repository
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- main
- "!dependabot/**"
pull_request:
branches:
- main
- "!dependabot/**"
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
FORCE_COLOR: 2
NODE: 18
NODE: 20

permissions:
contents: read
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

'use strict';

const program = require('commander');
const { program } = require('commander');
const lookup = require('../index.js');
const { name, description, version } = require('../package.json');

Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ module.exports = function({ dependency, filename, directory } = {}) {

if (fs.existsSync(sameDir)) return sameDir;

debug('resolved file does not exist');
debug(`resolved file does not exist: ${sameDir}`);

// Check for dependency/index.styl file
const indexFile = path.join(path.resolve(fileDir, dependency), 'index.styl');
debug(`resolving dependency as if it points to an index.styl file: ${indexFile}`);

if (fs.existsSync(indexFile)) return indexFile;

debug('resolved file does not exist');
debug(`resolved file does not exist: ${indexFile}`);
debug('could not resolve the dependency');

return '';
Expand Down
Loading
Loading