diff --git a/cjs/rollup-plugin-import-manager.cjs b/cjs/rollup-plugin-import-manager.cjs index 3e888ec..54c1050 100644 --- a/cjs/rollup-plugin-import-manager.cjs +++ b/cjs/rollup-plugin-import-manager.cjs @@ -129,7 +129,7 @@ const showDiff = (filename, source, code, diffOption) => { /** * [rollup-plugin-import-manager]{@link https://github.com/UmamiAppearance/rollup-plugin-import-manager} * - * @version 0.5.2 + * @version 0.5.3 * @author UmamiAppearance [mail@umamiappearance.eu] * @license MIT */ diff --git a/cjs/rollup-plugin-import-manager.cjs.map b/cjs/rollup-plugin-import-manager.cjs.map index fe3d939..3948c7b 100644 --- a/cjs/rollup-plugin-import-manager.cjs.map +++ b/cjs/rollup-plugin-import-manager.cjs.map @@ -1 +1 @@ -{"version":3,"file":"rollup-plugin-import-manager.cjs","sources":["../src/diff.js","../src/index.js"],"sourcesContent":["import { diffLines, structuredPatch } from \"diff\";\nimport { blue, bold, red, green, gray } from \"colorette\";\n\n\n/**\n * Adds an angle bracket to each line of a\n * text section.\n * @param {string} angle - '>' or '<'\n * @param {string} txt - The text section.\n * @returns {string} - The given text section with an angle bracket and a space in front of each line. \n */\nconst addAngles = (angle, txt) => {\n const txtArr = txt.split(\"\\n\");\n let lastChar = \"\";\n if (txt.at(-1) === \"\\n\") {\n lastChar = \"\\n\";\n txtArr.pop();\n }\n let output = txtArr.map(line => `${angle} ${line}`).join(\"\\n\");\n output += lastChar;\n return output;\n};\n\n\n/**\n * Prints an output in the mould of GNU diff when\n * called with no parameters other than the files.\n * But more picturesque, thanks to red and green\n * colors...\n * Also possible is a \"file\" mode. This variant\n * shows the whole file with added and removed\n * lines.\n * @param {string} source - The original code.\n * @param {string} code - The modified code.\n * @param {string} [diffOption] - As passed by the user. If the value is 'file' also unchanged code is printed. \n */\nconst showDiff = (filename, source, code, diffOption) => {\n const fileMode = diffOption == \"file\";\n \n console.log(bold(blue(\n `(plugin ImportManager) diff for file '${filename}':`\n )));\n \n console.log(gray(\"BEGIN >>>\"));\n\n if (fileMode) {\n const diff = diffLines(source, code);\n\n let message = \"\";\n \n diff.forEach((part) => {\n let msg;\n if (part.added) {\n msg = green(addAngles(\">\", part.value));\n } else if (part.removed) {\n msg = red(addAngles(\"<\", part.value));\n } else {\n msg = part.value;\n }\n message += msg;\n });\n \n console.log(message);\n \n }\n \n else {\n const diff = structuredPatch(\"\", \"\", source, code, \"\", \"\", {\n context: 0\n });\n \n for (const part of diff.hunks) {\n\n // add\n if (part.oldLines === 0) {\n let info = `${part.oldStart}a${part.newStart}`;\n if (part.newLines > 1) {\n info += `,${part.newStart+part.newLines-1}`;\n }\n console.log(bold(info));\n part.lines.forEach(line => console.log(green(`> ${line.slice(1)}`)));\n }\n \n // delete\n else if (part.newLines === 0) {\n let info = String(part.oldStart);\n if (part.oldLines > 1) {\n info += `,${part.oldStart+part.oldLines-1}`;\n }\n info += `d${part.newLines}`;\n console.log(bold(info));\n part.lines.forEach(line => console.log(red(`< ${line.slice(1)}`)));\n }\n \n // change\n else {\n let info = String(part.oldStart);\n if (part.oldLines > 1) {\n info += `,${part.oldStart+part.oldLines-1}`;\n }\n info += `c${part.newStart}`;\n if (part.newLines > 1) {\n info += `,${part.newStart+part.newLines-1}`;\n }\n console.log(bold(info));\n \n let plus = false;\n part.lines.forEach((line, i) => {\n if (plus) {\n console.log(green(`> ${line.slice(1)}`));\n } else {\n console.log(red(`< ${line.slice(1)}`));\n if (part.lines[i+1].at(0) === \"+\") {\n console.log(\"---\");\n plus = true;\n }\n }\n });\n }\n }\n }\n \n console.log(gray(\"<<< END\\n\"));\n};\n\nexport default showDiff;\n","/**\n * [rollup-plugin-import-manager]{@link https://github.com/UmamiAppearance/rollup-plugin-import-manager}\n *\n * @version 0.5.2\n * @author UmamiAppearance [mail@umamiappearance.eu]\n * @license MIT\n */\n\n\nimport { createFilter } from \"@rollup/pluginutils\";\nimport { ImportManager } from \"import-manager\";\nimport showDiff from \"./diff.js\";\n\n// test if input is an object\nconst isObject = input => typeof input === \"object\" && !Array.isArray(input) && input !== null;\n\n// helper to allow string and array\nconst ensureArray = (arr) => Array.isArray(arr) ? arr : [arr];\n\n// helper to allow string and object\nconst ensureObj = (input) => {\n\n if (typeof input === \"string\") {\n const output = {};\n output[input] = null;\n return output;\n }\n \n else if (isObject(input)) {\n return input;\n }\n \n throw new TypeError(\"Only strings and objects are allowed for actions.\");\n \n};\n\n// makes the life of the user a little bit easier\n// by accepting multiple versions of boolean vars \nconst bool = (b) => !(Boolean(b) === false || (/^(?:false|no?|0)$/i).test(String(b)));\n\n// allow some variations to enable object mode \n// for debugging\nconst showObjects = (v) => (/^(?:objects?|imports?|verbose)$/).test(String(v));\n\n\n// main\nconst importManager = (options={}) => {\n\n const filter = createFilter(options.include, options.exclude);\n\n // Initialize a new set to be passed to every \n // ImportManager instance. It keeps track of\n // warnings, that were shown already.\n const warnSpamProtection = new Set();\n \n return {\n name: \"ImportManager\",\n \n transform (source, id) {\n if (!filter(id)) return;\n\n const warnings = typeof options.warnings === \"undefined\" ? true : bool(options.warnings);\n\n const manager = new ImportManager(source, id, warnSpamProtection, warnings, this); \n\n if (!(\"units\" in options) || \"debug\" in options) {\n if (showObjects(options.debug)) {\n manager.logUnitObjects();\n } else {\n manager.logUnits();\n }\n }\n \n else {\n\n const unitArray = ensureArray(options.units);\n\n for (const unitSection of unitArray) {\n\n let allowId = false; \n let allowNull = true;\n\n if (\"file\" in unitSection) {\n const isMatch = createFilter(unitSection.file);\n\n if (!isMatch(id)) {\n continue;\n }\n\n allowId = true;\n allowNull = false;\n }\n\n\n // a little helper function to select a unit\n const selectUnit = (section) => {\n if (!isObject(section)) {\n throw new TypeError(\"Input must be an object.\");\n }\n\n let unit = null;\n \n if (\"id\" in section) {\n if (allowId) {\n manager.warning(\"Selecting modules via Id should only be used for testing.\");\n unit = manager.selectModById(section.id, allowNull);\n } else {\n throw new Error(\"Filename must be specified for selecting via Id.\");\n }\n } else if (\"hash\" in section) {\n unit = manager.selectModByHash(section.hash, allowNull);\n } else if (\"module\" in section) {\n unit = manager.selectModByName(section.module, section.type, allowNull);\n }\n \n return unit;\n };\n\n \n // creating units from scratch\n if (\"createModule\" in unitSection || \"addCode\" in unitSection) {\n\n let codeSnippet;\n let debug = false;\n\n if (\"createModule\" in unitSection) {\n\n if (allowNull) {\n manager.warning(\"No file specified for import statement creation! If the build fails, this could be the reason.\");\n }\n\n const module = unitSection.createModule;\n let type = unitSection.type;\n\n const mem = {\n defaultMembers: [],\n members: []\n };\n\n if (\"actions\" in unitSection) {\n for (let action of ensureArray(unitSection.actions)) {\n action = ensureObj(action);\n if ((action.select === \"members\" || action.select === \"defaultMembers\") && \"add\" in action) {\n mem[action.select] = ensureArray(action.add); \n }\n if (\"debug\" in action) {\n debug = true;\n }\n }\n }\n\n if (mem.defaultMembers.length || mem.members.length) {\n type = \"es6\";\n }\n\n \n if (!type) {\n throw new TypeError(\"If no (default) members are specified, the type cannot be determined and must be specified by passing 'type: \\\"cjs\\\"|\\\"dynamic\\\"|\\\"es6\\\"'\");\n } else if (type === \"es6\") {\n codeSnippet = manager.makeES6Statement(module, mem.defaultMembers, mem.members);\n } else {\n const declarators = /^(?:const|let|var|global)$/;\n const [ declarator, varname ] = Object.entries(unitSection).filter(e => declarators.test(e[0])).at(0) || [ null, null ];\n\n if (!declarator || !varname) {\n throw new TypeError(\"dynamic and cjs imports require a valid declarator key (const|let|var|global) and a value for the variable name.\");\n }\n\n if (type === \"cjs\") {\n codeSnippet = manager.makeCJSStatement(module, declarator, varname);\n } else if (type === \"dynamic\") {\n codeSnippet = manager.makeDynamicStatement(module, declarator, varname);\n }\n }\n }\n \n else {\n codeSnippet = unitSection.addCode;\n if (!(codeSnippet && typeof codeSnippet === \"string\")) {\n throw new TypeError(\"'addCode' must be a non empty string.\");\n }\n\n if (\"actions\" in unitSection) {\n for (let action of ensureArray(unitSection.actions)) {\n action = ensureObj(action);\n if (\"debug\" in action) {\n debug = true;\n }\n }\n }\n }\n \n let mode;\n for (const key in unitSection) {\n const targetMatch = key.match(/^(?:(?:ap|pre)pend|replace)$/);\n if (targetMatch) {\n mode = targetMatch.at(0);\n break;\n }\n }\n\n \n if (mode) {\n // look for the target with the values at key 'append|prepend|replace'\n const target = selectUnit(unitSection[mode]);\n\n if (debug) {\n manager.logCreations(codeSnippet, target, null, mode);\n }\n \n // insert if match is found\n // (which can be undefined if no file specified)\n if (target) {\n manager.insertAtUnit(target, mode, codeSnippet);\n }\n }\n\n else {\n // default is es6\n let type = \"es6\";\n\n // overwrite this if set by the config\n if (unitSection.type) {\n type = unitSection.type;\n } \n \n // if type is dynamic change to es6 if is6 imports\n // are found (as dynamic imports can be wildly spread)\n \n if (type === \"dynamic\" && manager.imports.es6.length) {\n type = \"es6\";\n }\n\n if (debug) {\n manager.logCreations(codeSnippet, null, type, unitSection.insert || \"bottom\");\n }\n\n manager.insertStatement(codeSnippet, unitSection.insert, type);\n }\n\n continue;\n }\n \n\n // select existing units\n const unit = selectUnit(unitSection);\n if (!unit) {\n continue;\n }\n \n \n if (\"actions\" in unitSection) {\n\n for (let action of ensureArray(unitSection.actions)) {\n \n action = ensureObj(action);\n \n if (\"debug\" in action) {\n unit.methods.log(); \n }\n\n // cut and paste a unit\n else if (\"cut\" in action) {\n const newSection = {...unitSection};\n delete newSection.actions;\n newSection.addCode = manager.remove(unit);\n unitArray.push(newSection);\n\n continue;\n }\n \n else if (\"select\" in action) {\n\n // module\n if (action.select === \"module\" && \"rename\" in action) {\n const modType = (\"modType\" in action) ? action.modType : unit.module.type;\n unit.methods.renameModule(action.rename, modType);\n }\n\n // single (default) member\n else if (action.select === \"member\" || action.select === \"defaultMember\" ) {\n const memberType = action.select;\n \n if (\"alias\" in action) {\n const alias = \"remove\" in action ? null : action.alias;\n unit.methods.setAlias(memberType, action.name, alias);\n }\n \n else if (\"rename\" in action) {\n const keepAlias = \"keepAlias\" in action ? bool(action.keepAlias) : false;\n unit.methods.renameMember(memberType, action.name, action.rename, keepAlias);\n }\n\n else if (\"remove\" in action) {\n unit.methods.removeMember(memberType, action.name);\n }\n\n }\n\n // entire group of (default) members\n else if (action.select === \"members\" || action.select === \"defaultMembers\") {\n if (\"remove\" in action) {\n unit.methods.removeMembers(action.select);\n }\n\n if (\"add\" in action) {\n if (action.select === \"members\") {\n unit.methods.addMembers(ensureArray(action.add));\n } else {\n unit.methods.addDefaultMembers(ensureArray(action.add));\n }\n } \n }\n }\n\n // remove the entire unit\n else if (\"remove\" in action) {\n manager.remove(unit);\n continue;\n }\n\n // apply the changes to the code\n manager.commitChanges(unit);\n }\n }\n }\n }\n\n const code = manager.code.toString();\n \n if (\"showDiff\" in options && manager.code.hasChanged()) {\n showDiff(id, source, code, options.showDiff);\n }\n \n let map;\n\n if (options.sourceMap !== false && options.sourcemap !== false) {\n map = manager.code.generateMap({ hires: true });\n }\n\n return { code, map };\n }\n };\n};\n \nexport { importManager };\n"],"names":["bold","blue","gray","diff","diffLines","green","red","structuredPatch","createFilter","ImportManager"],"mappings":";;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK;AAClC,IAAI,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACnC,IAAI,IAAI,QAAQ,GAAG,EAAE,CAAC;AACtB,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;AAC7B,QAAQ,QAAQ,GAAG,IAAI,CAAC;AACxB,QAAQ,MAAM,CAAC,GAAG,EAAE,CAAC;AACrB,KAAK;AACL,IAAI,IAAI,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnE,IAAI,MAAM,IAAI,QAAQ,CAAC;AACvB,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AACF;AACA;AACA;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iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACpG,yCAAyC;AACzC,qCAAqC;AACrC,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA,iCAAiC,IAAI,QAAQ,IAAI,MAAM,EAAE;AACzD,gCAAgC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACrD,gCAAgC,SAAS;AACzC,6BAA6B;AAC7B;AACA;AACA,4BAA4B,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AACxD,yBAAyB;AACzB,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA,YAAY,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjD;AACA,YAAY,IAAI,UAAU,IAAI,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;AACpE,gBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7D,aAAa;AACb;AACA,YAAY,IAAI,GAAG,CAAC;AACpB;AACA,YAAY,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,EAAE;AAC5E,gBAAgB,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAChE,aAAa;AACb;AACA,YAAY,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACjC,SAAS;AACT,KAAK,CAAC;AACN;;;;"} \ No newline at end of file +{"version":3,"file":"rollup-plugin-import-manager.cjs","sources":["../src/diff.js","../src/index.js"],"sourcesContent":["import { diffLines, structuredPatch } from \"diff\";\nimport { blue, bold, red, green, gray } from \"colorette\";\n\n\n/**\n * Adds an angle bracket to each line of a\n * text section.\n * @param {string} angle - '>' or '<'\n * @param {string} txt - The text section.\n * @returns {string} - The given text section with an angle bracket and a space in front of each line. \n */\nconst addAngles = (angle, txt) => {\n const txtArr = txt.split(\"\\n\");\n let lastChar = \"\";\n if (txt.at(-1) === \"\\n\") {\n lastChar = \"\\n\";\n txtArr.pop();\n }\n let output = txtArr.map(line => `${angle} ${line}`).join(\"\\n\");\n output += lastChar;\n return output;\n};\n\n\n/**\n * Prints an output in the mould of GNU diff when\n * called with no parameters other than the files.\n * But more picturesque, thanks to red and green\n * colors...\n * Also possible is a \"file\" mode. This variant\n * shows the whole file with added and removed\n * lines.\n * @param {string} source - The original code.\n * @param {string} code - The modified code.\n * @param {string} [diffOption] - As passed by the user. If the value is 'file' also unchanged code is printed. \n */\nconst showDiff = (filename, source, code, diffOption) => {\n const fileMode = diffOption == \"file\";\n \n console.log(bold(blue(\n `(plugin ImportManager) diff for file '${filename}':`\n )));\n \n console.log(gray(\"BEGIN >>>\"));\n\n if (fileMode) {\n const diff = diffLines(source, code);\n\n let message = \"\";\n \n diff.forEach((part) => {\n let msg;\n if (part.added) {\n msg = green(addAngles(\">\", part.value));\n } else if (part.removed) {\n msg = red(addAngles(\"<\", part.value));\n } else {\n msg = part.value;\n }\n message += msg;\n });\n \n console.log(message);\n \n }\n \n else {\n const diff = structuredPatch(\"\", \"\", source, code, \"\", \"\", {\n context: 0\n });\n \n for (const part of diff.hunks) {\n\n // add\n if (part.oldLines === 0) {\n let info = `${part.oldStart}a${part.newStart}`;\n if (part.newLines > 1) {\n info += `,${part.newStart+part.newLines-1}`;\n }\n console.log(bold(info));\n part.lines.forEach(line => console.log(green(`> ${line.slice(1)}`)));\n }\n \n // delete\n else if (part.newLines === 0) {\n let info = String(part.oldStart);\n if (part.oldLines > 1) {\n info += `,${part.oldStart+part.oldLines-1}`;\n }\n info += `d${part.newLines}`;\n console.log(bold(info));\n part.lines.forEach(line => console.log(red(`< ${line.slice(1)}`)));\n }\n \n // change\n else {\n let info = String(part.oldStart);\n if (part.oldLines > 1) {\n info += `,${part.oldStart+part.oldLines-1}`;\n }\n info += `c${part.newStart}`;\n if (part.newLines > 1) {\n info += `,${part.newStart+part.newLines-1}`;\n }\n console.log(bold(info));\n \n let plus = false;\n part.lines.forEach((line, i) => {\n if (plus) {\n console.log(green(`> ${line.slice(1)}`));\n } else {\n console.log(red(`< ${line.slice(1)}`));\n if (part.lines[i+1].at(0) === \"+\") {\n console.log(\"---\");\n plus = true;\n }\n }\n });\n }\n }\n }\n \n console.log(gray(\"<<< END\\n\"));\n};\n\nexport default showDiff;\n","/**\n * [rollup-plugin-import-manager]{@link https://github.com/UmamiAppearance/rollup-plugin-import-manager}\n *\n * @version 0.5.3\n * @author UmamiAppearance [mail@umamiappearance.eu]\n * @license MIT\n */\n\n\nimport { createFilter } from \"@rollup/pluginutils\";\nimport { ImportManager } from \"import-manager\";\nimport showDiff from \"./diff.js\";\n\n// test if input is an object\nconst isObject = input => typeof input === \"object\" && !Array.isArray(input) && input !== null;\n\n// helper to allow string and array\nconst ensureArray = (arr) => Array.isArray(arr) ? arr : [arr];\n\n// helper to allow string and object\nconst ensureObj = (input) => {\n\n if (typeof input === \"string\") {\n const output = {};\n output[input] = null;\n return output;\n }\n \n else if (isObject(input)) {\n return input;\n }\n \n throw new TypeError(\"Only strings and objects are allowed for actions.\");\n \n};\n\n// makes the life of the user a little bit easier\n// by accepting multiple versions of boolean vars \nconst bool = (b) => !(Boolean(b) === false || (/^(?:false|no?|0)$/i).test(String(b)));\n\n// allow some variations to enable object mode \n// for debugging\nconst showObjects = (v) => (/^(?:objects?|imports?|verbose)$/).test(String(v));\n\n\n// main\nconst importManager = (options={}) => {\n\n const filter = createFilter(options.include, options.exclude);\n\n // Initialize a new set to be passed to every \n // ImportManager instance. It keeps track of\n // warnings, that were shown already.\n const warnSpamProtection = new Set();\n \n return {\n name: \"ImportManager\",\n \n transform (source, id) {\n if (!filter(id)) return;\n\n const warnings = typeof options.warnings === \"undefined\" ? true : bool(options.warnings);\n\n const manager = new ImportManager(source, id, warnSpamProtection, warnings, this); \n\n if (!(\"units\" in options) || \"debug\" in options) {\n if (showObjects(options.debug)) {\n manager.logUnitObjects();\n } else {\n manager.logUnits();\n }\n }\n \n else {\n\n const unitArray = ensureArray(options.units);\n\n for (const unitSection of unitArray) {\n\n let allowId = false; \n let allowNull = true;\n\n if (\"file\" in unitSection) {\n const isMatch = createFilter(unitSection.file);\n\n if (!isMatch(id)) {\n continue;\n }\n\n allowId = true;\n allowNull = false;\n }\n\n\n // a little helper function to select a unit\n const selectUnit = (section) => {\n if (!isObject(section)) {\n throw new TypeError(\"Input must be an object.\");\n }\n\n let unit = null;\n \n if (\"id\" in section) {\n if (allowId) {\n manager.warning(\"Selecting modules via Id should only be used for testing.\");\n unit = manager.selectModById(section.id, allowNull);\n } else {\n throw new Error(\"Filename must be specified for selecting via Id.\");\n }\n } else if (\"hash\" in section) {\n unit = manager.selectModByHash(section.hash, allowNull);\n } else if (\"module\" in section) {\n unit = manager.selectModByName(section.module, section.type, allowNull);\n }\n \n return unit;\n };\n\n \n // creating units from scratch\n if (\"createModule\" in unitSection || \"addCode\" in unitSection) {\n\n let codeSnippet;\n let debug = false;\n\n if (\"createModule\" in unitSection) {\n\n if (allowNull) {\n manager.warning(\"No file specified for import statement creation! If the build fails, this could be the reason.\");\n }\n\n const module = unitSection.createModule;\n let type = unitSection.type;\n\n const mem = {\n defaultMembers: [],\n members: []\n };\n\n if (\"actions\" in unitSection) {\n for (let action of ensureArray(unitSection.actions)) {\n action = ensureObj(action);\n if ((action.select === \"members\" || action.select === \"defaultMembers\") && \"add\" in action) {\n mem[action.select] = ensureArray(action.add); \n }\n if (\"debug\" in action) {\n debug = true;\n }\n }\n }\n\n if (mem.defaultMembers.length || mem.members.length) {\n type = \"es6\";\n }\n\n \n if (!type) {\n throw new TypeError(\"If no (default) members are specified, the type cannot be determined and must be specified by passing 'type: \\\"cjs\\\"|\\\"dynamic\\\"|\\\"es6\\\"'\");\n } else if (type === \"es6\") {\n codeSnippet = manager.makeES6Statement(module, mem.defaultMembers, mem.members);\n } else {\n const declarators = /^(?:const|let|var|global)$/;\n const [ declarator, varname ] = Object.entries(unitSection).filter(e => declarators.test(e[0])).at(0) || [ null, null ];\n\n if (!declarator || !varname) {\n throw new TypeError(\"dynamic and cjs imports require a valid declarator key (const|let|var|global) and a value for the variable name.\");\n }\n\n if (type === \"cjs\") {\n codeSnippet = manager.makeCJSStatement(module, declarator, varname);\n } else if (type === \"dynamic\") {\n codeSnippet = manager.makeDynamicStatement(module, declarator, varname);\n }\n }\n }\n \n else {\n codeSnippet = unitSection.addCode;\n if (!(codeSnippet && typeof codeSnippet === \"string\")) {\n throw new TypeError(\"'addCode' must be a non empty string.\");\n }\n\n if (\"actions\" in unitSection) {\n for (let action of ensureArray(unitSection.actions)) {\n action = ensureObj(action);\n if (\"debug\" in action) {\n debug = true;\n }\n }\n }\n }\n \n let mode;\n for (const key in unitSection) {\n const targetMatch = key.match(/^(?:(?:ap|pre)pend|replace)$/);\n if (targetMatch) {\n mode = targetMatch.at(0);\n break;\n }\n }\n\n \n if (mode) {\n // look for the target with the values at key 'append|prepend|replace'\n const target = selectUnit(unitSection[mode]);\n\n if (debug) {\n manager.logCreations(codeSnippet, target, null, mode);\n }\n \n // insert if match is found\n // (which can be undefined if no file specified)\n if (target) {\n manager.insertAtUnit(target, mode, codeSnippet);\n }\n }\n\n else {\n // default is es6\n let type = \"es6\";\n\n // overwrite this if set by the config\n if (unitSection.type) {\n type = unitSection.type;\n } \n \n // if type is dynamic change to es6 if is6 imports\n // are found (as dynamic imports can be wildly spread)\n \n if (type === \"dynamic\" && manager.imports.es6.length) {\n type = \"es6\";\n }\n\n if (debug) {\n manager.logCreations(codeSnippet, null, type, unitSection.insert || \"bottom\");\n }\n\n manager.insertStatement(codeSnippet, unitSection.insert, type);\n }\n\n continue;\n }\n \n\n // select existing units\n const unit = selectUnit(unitSection);\n if (!unit) {\n continue;\n }\n \n \n if (\"actions\" in unitSection) {\n\n for (let action of ensureArray(unitSection.actions)) {\n \n action = ensureObj(action);\n \n if (\"debug\" in action) {\n unit.methods.log(); \n }\n\n // cut and paste a unit\n else if (\"cut\" in action) {\n const newSection = {...unitSection};\n delete newSection.actions;\n newSection.addCode = manager.remove(unit);\n unitArray.push(newSection);\n\n continue;\n }\n \n else if (\"select\" in action) {\n\n // module\n if (action.select === \"module\" && \"rename\" in action) {\n const modType = (\"modType\" in action) ? action.modType : unit.module.type;\n unit.methods.renameModule(action.rename, modType);\n }\n\n // single (default) member\n else if (action.select === \"member\" || action.select === \"defaultMember\" ) {\n const memberType = action.select;\n \n if (\"alias\" in action) {\n const alias = \"remove\" in action ? null : action.alias;\n unit.methods.setAlias(memberType, action.name, alias);\n }\n \n else if (\"rename\" in action) {\n const keepAlias = \"keepAlias\" in action ? bool(action.keepAlias) : false;\n unit.methods.renameMember(memberType, action.name, action.rename, keepAlias);\n }\n\n else if (\"remove\" in action) {\n unit.methods.removeMember(memberType, action.name);\n }\n\n }\n\n // entire group of (default) members\n else if (action.select === \"members\" || action.select === \"defaultMembers\") {\n if (\"remove\" in action) {\n unit.methods.removeMembers(action.select);\n }\n\n if (\"add\" in action) {\n if (action.select === \"members\") {\n unit.methods.addMembers(ensureArray(action.add));\n } else {\n unit.methods.addDefaultMembers(ensureArray(action.add));\n }\n } \n }\n }\n\n // remove the entire unit\n else if (\"remove\" in action) {\n manager.remove(unit);\n continue;\n }\n\n // apply the changes to the code\n manager.commitChanges(unit);\n }\n }\n }\n }\n\n const code = manager.code.toString();\n \n if (\"showDiff\" in options && manager.code.hasChanged()) {\n showDiff(id, source, code, options.showDiff);\n }\n \n let map;\n\n if (options.sourceMap !== false && options.sourcemap !== false) {\n map = manager.code.generateMap({ hires: true });\n }\n\n return { code, map };\n }\n };\n};\n \nexport { importManager };\n"],"names":["bold","blue","gray","diff","diffLines","green","red","structuredPatch","createFilter","ImportManager"],"mappings":";;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,GAAG,K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AY,IAAI,GAAG,CAAC;AACpB;AACA,YAAY,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,IAAI,OAAO,CAAC,SAAS,KAAK,KAAK,EAAE;AAC5E,gBAAgB,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAChE,aAAa;AACb;AACA,YAAY,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACjC,SAAS;AACT,KAAK,CAAC;AACN;;;;"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4470940..ed90d2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,34 +1,58 @@ { "name": "rollup-plugin-import-manager", - "version": "0.5.2", + "version": "0.5.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rollup-plugin-import-manager", - "version": "0.5.2", + "version": "0.5.3", "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.2", "colorette": "^2.0.19", "diff": "^5.1.0", - "import-manager": "^0.3.2" + "import-manager": "^0.3.3" }, "devDependencies": { "ava": "^5.2.0", - "eslint": "^8.35.0", - "rollup": "^3.18.0" + "eslint": "^8.36.0", + "rollup": "^3.20.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", + "integrity": "sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", - "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -44,9 +68,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", - "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -854,13 +878,15 @@ } }, "node_modules/eslint": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", - "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^2.0.0", - "@eslint/js": "8.35.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -871,9 +897,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", + "espree": "^9.5.0", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -895,7 +920,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -923,33 +947,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", @@ -1033,9 +1030,9 @@ } }, "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -1353,9 +1350,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/grapheme-splitter": { @@ -1408,9 +1405,9 @@ } }, "node_modules/import-manager": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/import-manager/-/import-manager-0.3.2.tgz", - "integrity": "sha512-QpLVaTCma6S7d/p6e+8GVxXRj749Em8VkYgzL9qEYYzQoHUHkZHVUSGBujSCfbet2hU8j6TAsitrorUl6JGY3A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/import-manager/-/import-manager-0.3.3.tgz", + "integrity": "sha512-24HG+yEe9zaMo7ltWnJMO381suXUi29OHi4kR7ecmDgoar8G+P0kPMf/692EWJKBkfY/DG/1zQZu47/T/DK7Hw==", "dependencies": { "acorn": "^8.8.2", "acorn-walk": "^8.2.0", @@ -1456,9 +1453,9 @@ "dev": true }, "node_modules/irregular-plurals": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.4.1.tgz", - "integrity": "sha512-JR7VL+1Kd9z79bE+2uSgifpzrTwLWmTvyeUewhxZCHVtpPImAsLk4adfRxg86uvdsJ8etYYrpzN7vRT30gGnOA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", + "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", "dev": true, "engines": { "node": ">=8" @@ -1582,9 +1579,9 @@ "dev": true }, "node_modules/js-sdsl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", - "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", + "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", "dev": true, "funding": { "type": "opencollective", @@ -2207,18 +2204,6 @@ "node": ">=8.10.0" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -2284,9 +2269,9 @@ } }, "node_modules/rollup": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.18.0.tgz", - "integrity": "sha512-J8C6VfEBjkvYPESMQYxKHxNOh4A5a3FlP+0BETGo34HEcE4eTlgCrO2+eWzlu2a/sHs2QUkZco+wscH7jhhgWg==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.20.0.tgz", + "integrity": "sha512-YsIfrk80NqUDrxrjWPXUa7PWvAfegZEXHuPsEZg58fGCdjL1I9C1i/NaG+L+27kxxwkrG/QEDEQc8s/ynXWWGQ==", "devOptional": true, "bin": { "rollup": "dist/bin/rollup" diff --git a/package.json b/package.json index 04fc8f2..a54893b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup-plugin-import-manager", - "version": "0.5.2", + "version": "0.5.3", "description": "A rollup plugin to add, modify, and remove imports (cjs/es6/dynamic)", "main": "./cjs/rollup-plugin-import-manager.cjs", "module": "./src/index.js", @@ -45,11 +45,11 @@ "@rollup/pluginutils": "^5.0.2", "colorette": "^2.0.19", "diff": "^5.1.0", - "import-manager": "^0.3.2" + "import-manager": "^0.3.3" }, "devDependencies": { "ava": "^5.2.0", - "eslint": "^8.35.0", - "rollup": "^3.18.0" + "eslint": "^8.36.0", + "rollup": "^3.20.0" } } diff --git a/src/index.js b/src/index.js index aaadbfa..15164a1 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ /** * [rollup-plugin-import-manager]{@link https://github.com/UmamiAppearance/rollup-plugin-import-manager} * - * @version 0.5.2 + * @version 0.5.3 * @author UmamiAppearance [mail@umamiappearance.eu] * @license MIT */