ACIL FM
Dark
Refresh
Current DIR:
/lib/node_modules/npm/node_modules/@npmcli/package-json/lib
/
lib
node_modules
npm
node_modules
@npmcli
package-json
lib
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
index.js
2.69 MB
chmod
View
DL
Edit
Rename
Delete
update-dependencies.js
1.98 MB
chmod
View
DL
Edit
Rename
Delete
update-scripts.js
664 B
chmod
View
DL
Edit
Rename
Delete
update-workspaces.js
626 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /lib/node_modules/npm/node_modules/@npmcli/package-json/lib/update-workspaces.js
const updateWorkspaces = ({ content, originalContent = {} }) => { const newWorkspaces = content.workspaces if (!newWorkspaces) { return originalContent } // validate workspaces content being appended const hasInvalidWorkspaces = () => newWorkspaces.some(w => !(typeof w === 'string')) if (!newWorkspaces.length || hasInvalidWorkspaces()) { throw Object.assign( new TypeError('workspaces should be an array of strings.'), { code: 'EWORKSPACESINVALID' } ) } return { ...originalContent, workspaces: [ ...newWorkspaces, ], } } module.exports = updateWorkspaces
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply