-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(security): remove cpx and glob dependency from the monorepo (#1173)
## Proposed change Remove `cpx` and `glob` dependencies from the monorepo Fixing issue reported on https://github.com/AmadeusITGroup/otter/security/dependabot/3
- Loading branch information
Showing
5 changed files
with
39 additions
and
1,148 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,15 +1,13 @@ | ||
const cpx = require('cpx'); | ||
const fs = require('node:fs'); | ||
const path = require('node:path'); | ||
const util = require('util'); | ||
const minimist = require('minimist'); | ||
|
||
const copyFile = util.promisify(cpx.copy); | ||
|
||
const root = path.resolve(__dirname, '..'); | ||
const argv = minimist(process.argv.slice(2)); | ||
const folderName = argv.folderName || '@ama-sdk/showcase-sdk'; | ||
|
||
(async () => { | ||
await copyFile(path.join(root, 'readme.md'), path.join(root, '.readme-backup')); | ||
await copyFile(path.join(root, 'packages', folderName, 'readme.md'), root); | ||
await fs.promises.copyFile(path.join(root, 'readme.md'), path.join(root, '.readme-backup', 'readme.md')); | ||
await fs.promises.copyFile(path.join(root, 'packages', folderName, 'readme.md'), path.join(root, 'readme.md')); | ||
})(); |
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,14 +1,13 @@ | ||
const cpx = require('cpx'); | ||
const fs = require('node:fs'); | ||
const path = require('node:path'); | ||
const util = require('util'); | ||
const rimraf = require('rimraf'); | ||
|
||
const copyFile = util.promisify(cpx.copy); | ||
const rimrafDir = util.promisify(rimraf); | ||
|
||
const root = path.resolve(__dirname, '..'); | ||
|
||
(async () => { | ||
await copyFile(path.join(root, '.readme-backup', 'readme.md'), root); | ||
await fs.promises.copyFile(path.join(root, '.readme-backup', 'readme.md'), path.join(root, 'readme.md')); | ||
await rimrafDir(path.join(root, '.readme-backup')); | ||
})(); |
Oops, something went wrong.