-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require Node.js 12.20 and move to ESM
Fixes #14
- Loading branch information
1 parent
c757835
commit 8968c9b
Showing
8 changed files
with
22 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
'use strict'; | ||
const shellPath = require('shell-path'); | ||
import process from 'node:process'; | ||
import {shellPathSync} from 'shell-path'; | ||
|
||
module.exports = () => { | ||
export default function fixPath() { | ||
if (process.platform !== 'darwin') { | ||
return; | ||
} | ||
|
||
process.env.PATH = shellPath.sync() || [ | ||
process.env.PATH = shellPathSync() || [ | ||
'./node_modules/.bin', | ||
'/.nodebrew/current/bin', | ||
'/usr/local/bin', | ||
process.env.PATH | ||
process.env.PATH, | ||
].join(':'); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {expectType} from 'tsd'; | ||
import fixPath = require('.'); | ||
import fixPath from './index.js'; | ||
|
||
expectType<void>(fixPath()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,10 @@ | |
"email": "[email protected]", | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=10" | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava && tsd" | ||
|
@@ -24,7 +26,6 @@ | |
"fix", | ||
"path", | ||
"macos", | ||
"osx", | ||
"env", | ||
"environment", | ||
"variable", | ||
|
@@ -34,11 +35,11 @@ | |
"electron" | ||
], | ||
"dependencies": { | ||
"shell-path": "^2.1.0" | ||
"shell-path": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.11.0", | ||
"xo": "^0.26.1" | ||
"ava": "^3.15.0", | ||
"tsd": "^0.17.0", | ||
"xo": "^0.44.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters