Skip to content

Commit

Permalink
feat: replace npm i with synp convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jul 8, 2020
1 parent f060c3a commit 7272a9c
Show file tree
Hide file tree
Showing 4 changed files with 447 additions and 319 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
"author": "Anton Golub <[email protected]>",
"license": "MIT",
"dependencies": {
"tslib": "^2.0.0",
"rimraf": "^3.0.2"
"rimraf": "^3.0.2",
"synp": "^1.7.0",
"tslib": "^2.0.0"
},
"devDependencies": {
"@qiwi/libdefkit": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/main/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type Stage = [

export const stages: Stage[] = [
[
'Generating package-lock.json...',
['npm', ['i', '--package-lock-only']],
'Generating package-lock.json from yarn.lock',
['node_modules/.bin/synp', ['yarn.lock']],
],
[
'Applying npm audit fix...',
Expand Down
2 changes: 1 addition & 1 deletion src/test/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('yarn-audit-fix', () => {
it('invokes cmd queue with proper args', () => {
require('../../main/ts/cli')

expect(cp.spawnSync).toHaveBeenCalledWith('npm', ['i', '--package-lock-only'])
expect(cp.spawnSync).toHaveBeenCalledWith('node_modules/.bin/synp', ['yarn.lock'])
expect(cp.spawnSync).toHaveBeenCalledWith('npm', ['audit', 'fix'])
expect(cp.spawnSync).toHaveBeenCalledWith('node_modules/.bin/rimraf', ['yarn.lock'])
expect(cp.spawnSync).toHaveBeenCalledWith('yarn', ['import'])
Expand Down
Loading

0 comments on commit 7272a9c

Please sign in to comment.