Skip to content

Commit

Permalink
chore(npm): update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Mar 28, 2024
1 parent 1bbb84e commit 55b3d70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/helpers/command/Npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Npm {
options?: LinkPackageOptions
) {
await Exec.link(libraries, options).then(() => {
if (Rc.file.base === 'package.json') {
if (Rc.file?.base === 'package.json') {
return Rc.reload()
}
})
Expand All @@ -64,7 +64,7 @@ export class Npm {
options?: InstallPackageOptions
) {
await Exec.install(libraries, options).then(() => {
if (Rc.file.base === 'package.json') {
if (Rc.file?.base === 'package.json') {
return Rc.reload()
}
})
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/helpers/command/NpmTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* file that was distributed with this source code.
*/

import { Exec } from '@athenna/common'
import { Rc } from '@athenna/config'
import { Exec, Path } from '@athenna/common'
import { Npm } from '#src/helpers/command/Npm'
import { Test, BeforeEach, type Context, Mock, AfterEach } from '@athenna/test'

Expand All @@ -17,6 +18,7 @@ export default class NpmTest {
@BeforeEach()
public async beforeEach() {
this.npm = new Npm()
Rc.setFile(Path.pwd('package.json'))
}

@AfterEach()
Expand Down

0 comments on commit 55b3d70

Please sign in to comment.