-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from eckode/npm-update
[CHORE] NPM packages updated, rimraf fixes
- Loading branch information
Showing
12 changed files
with
2,146 additions
and
1,631 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env node | ||
import '../src/index.mjs' | ||
import '../src/index.mjs'; |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as rimrafPkg from 'rimraf'; | ||
export const { rimraf } = rimrafPkg; | ||
export default rimrafPkg; | ||
|
||
import { createRequire } from 'module'; | ||
export const require = createRequire(import.meta.url); |
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,20 +1,14 @@ | ||
// const copyFile = async (src, dest) => { | ||
// await fs.promises.copyFile(src, dest); | ||
// }; | ||
import fs from 'fs/promises'; | ||
import { resolve } from 'path'; | ||
import { logger } from './utils.mjs'; | ||
import packageJson from '../package.json' assert { type: 'json' }; | ||
import { logger, rmRf } from './utils.mjs'; | ||
|
||
const packageJsonPath = resolve('./', 'package.json'); | ||
|
||
(async () => { | ||
logger('Package.json file copied'); | ||
logger('Making changes...'); | ||
const updatedJson = ({ devDependencies: dependencies, ...rest }: typeof packageJson) => ({ | ||
...rest, | ||
dependencies, | ||
}); | ||
await fs.writeFile('./package.json', JSON.stringify(updatedJson(packageJson))); | ||
logger('Changes applied'); | ||
})(); | ||
logger('Making changes...'); | ||
const updatedJson = ({ devDependencies: dependencies, ...rest }: typeof packageJson) => ({ | ||
...rest, | ||
dependencies, | ||
}); | ||
await fs.writeFile('./package.json', JSON.stringify(updatedJson(packageJson))); | ||
logger('Changes applied'); | ||
})(); |
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
File renamed without changes.
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
Oops, something went wrong.