-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
86 additions
and
66 deletions.
There are no files selected for viewing
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,6 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
import update from './update.js'; | ||
import install from './install.js'; | ||
import { resolve } from 'node:path'; | ||
|
||
await install; | ||
await update(process.argv.slice(2), resolve('.npmrc')); |
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
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,23 +1,10 @@ | ||
import spawn from '../lib/spawn.js'; | ||
import { fileURLToPath } from 'node:url'; | ||
import path from 'node:path'; | ||
|
||
describe('install', () => { | ||
it('install script', async () => { | ||
const filename = fileURLToPath( | ||
import.meta.url, | ||
); | ||
await spawn([ | ||
process.execPath, | ||
path.resolve( | ||
path.dirname(filename), | ||
'../lib/install', | ||
), | ||
], { | ||
encoding: 'utf8', | ||
env: { | ||
PATH: process.env.PATH, | ||
}, | ||
}); | ||
(await import('../lib/install.js')).install(); | ||
}); | ||
|
||
it('install without npm', async () => { | ||
(await import('../lib/install.js')).install({}); | ||
}); | ||
}); |