🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-14 16:55:56 | PHP 8.1.34
📂
/ (Root)
/
usr
/
lib
/
node_modules
/
npm
/
node_modules
/
@npmcli
/
package-json
/
lib
📍 /usr/lib/node_modules/npm/node_modules/@npmcli/package-json/lib
🔄 Refresh
✏️
Editing: update-workspaces.js
Read Only
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
💾 Save Changes
❌ Cancel