@embroider/compat 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embroider/compat",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "private": false,
5
5
  "description": "Backward compatibility layer for the Embroider build system.",
6
6
  "repository": {
@@ -77,8 +77,6 @@
77
77
  "@types/resolve": "^1.20.0",
78
78
  "@types/semver": "^7.3.6",
79
79
  "code-equality-assertions": "^0.7.0",
80
- "ember-cli-htmlbars-3": "npm:ember-cli-htmlbars@3",
81
- "ember-cli-htmlbars-inline-precompile": "^2.1.0",
82
80
  "ember-engines": "^0.8.19",
83
81
  "scenario-tester": "^2.0.1",
84
82
  "typescript": "*"
package/src/audit-cli.js CHANGED
File without changes
@@ -78,5 +78,6 @@ const htmlbarPathMatches = [
78
78
  ['ember-cli-htmlbars', 'lib', 'require-from-worker.js'].join(path_1.sep),
79
79
  ['ember-cli-htmlbars', 'index'].join(path_1.sep),
80
80
  ['ember-cli-htmlbars', 'lib', 'require-from-worker'].join(path_1.sep),
81
+ ['babel-plugin-ember-template-compilation', 'src', 'node-main.js'].join(path_1.sep),
81
82
  ];
82
83
  //# sourceMappingURL=detect-babel-plugins.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"detect-babel-plugins.js","sourceRoot":"","sources":["detect-babel-plugins.ts"],"names":[],"mappings":";;;AACA,+BAAiC;AAEjC,SAAgB,wBAAwB,CAAC,IAAgB;IACvD,IAAI,UAAkB,CAAC;IACvB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,UAAU,GAAG,IAAI,CAAC;KACnB;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;QAChF,UAAU,G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4BAA4B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IACjD,CAAC,4BAA4B,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IACtE,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IAC5C,CAAC,oBAAoB,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IACjE,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IACzC,CAAC,oBAAoB,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;CAC/D,CAAC","sourcesContent":["import { PluginItem } from '@babel/core';\nimport { join, sep } from 'path';\n\nexport function isEmberAutoImportDynamic(item: PluginItem): boolean {\n let pluginPath: string;\n if (typeof item === 'string') {\n pluginPath = item;\n } else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') {\n pluginPath = item[0];\n } else {\n return false;\n }\n\n return pluginPath.includes(join(sep, 'ember-auto-import', sep));\n}\n\nexport function isCompactReexports(item: PluginItem): boolean {\n let pluginPath: string;\n if (typeof item === 'string') {\n pluginPath = item;\n } else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') {\n pluginPath = item[0];\n } else {\n return false;\n }\n\n return pluginPath.includes(join('babel-plugin-compact-reexports', sep));\n}\n\nexport function isColocationPlugin(item: PluginItem): boolean {\n let pluginPath: string;\n if (typeof item === 'string') {\n pluginPath = item;\n } else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') {\n pluginPath = item[0];\n } else {\n return false;\n }\n\n return pluginPath.includes(join('ember-cli-htmlbars', 'lib', 'colocated-babel-plugin', sep));\n}\n\n// tests for the classic ember-cli-htmlbars-inline-precompile babel plugin\nexport function isInlinePrecompilePlugin(item: PluginItem) {\n if (typeof item === 'string') {\n return matchesSourceFile(item);\n }\n if (hasProperties(item) && (item as any)._parallelBabel) {\n return matchesSourceFile((item as any)._parallelBabel.requireFile);\n }\n if (Array.isArray(item) && item.length > 0) {\n if (typeof item[0] === 'string') {\n return matchesSourceFile(item[0]);\n }\n if (hasProperties(item[0]) && (item[0] as any)._parallelBabel) {\n return matchesSourceFile((item[0] as any)._parallelBabel.requireFile);\n }\n }\n return false;\n}\n\nfunction matchesSourceFile(filename: string) {\n return Boolean(htmlbarPathMatches.find(match => filename.endsWith(match)));\n}\n\nfunction hasProperties(item: any) {\n return item && (typeof item === 'object' || typeof item === 'function');\n}\n\nconst htmlbarPathMatches = [\n ['htmlbars-inline-precompile', 'index.js'].join(sep),\n ['htmlbars-inline-precompile', 'lib', 'require-from-worker.js'].join(sep),\n ['htmlbars-inline-precompile', 'index'].join(sep),\n ['htmlbars-inline-precompile', 'lib', 'require-from-worker'].join(sep),\n ['ember-cli-htmlbars', 'index.js'].join(sep),\n ['ember-cli-htmlbars', 'lib', 'require-from-worker.js'].join(sep),\n ['ember-cli-htmlbars', 'index'].join(sep),\n ['ember-cli-htmlbars', 'lib', 'require-from-worker'].join(sep),\n];\n"]}
1
+ {"version":3,"file":"detect-babel-plugins.js","sourceRoot":"","sources":["detect-babel-plugins.ts"],"names":[],"mappings":";;;AACA,+BAAiC;AAEjC,SAAgB,wBAAwB,CAAC,IAAgB;IACvD,IAAI,UAAkB,CAAC;IACvB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,UAAU,GAAG,IAAI,CAAC;KACnB;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;QAChF,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;KACtB;SAAM;QACL,OAAO,KAAK,CAAC;KACd;IAED,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAA,WAAI,EAAC,UAAG,EAAE,mBAAmB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AC,oBAAoB,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IAC5C,CAAC,oBAAoB,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IACjE,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IACzC,CAAC,oBAAoB,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;IAC9D,CAAC,yCAAyC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,UAAG,CAAC;CAC7E,CAAC","sourcesContent":["import { PluginItem } from '@babel/core';\nimport { join, sep } from 'path';\n\nexport function isEmberAutoImportDynamic(item: PluginItem): boolean {\n let pluginPath: string;\n if (typeof item === 'string') {\n pluginPath = item;\n } else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') {\n pluginPath = item[0];\n } else {\n return false;\n }\n\n return pluginPath.includes(join(sep, 'ember-auto-import', sep));\n}\n\nexport function isCompactReexports(item: PluginItem): boolean {\n let pluginPath: string;\n if (typeof item === 'string') {\n pluginPath = item;\n } else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') {\n pluginPath = item[0];\n } else {\n return false;\n }\n\n return pluginPath.includes(join('babel-plugin-compact-reexports', sep));\n}\n\nexport function isColocationPlugin(item: PluginItem): boolean {\n let pluginPath: string;\n if (typeof item === 'string') {\n pluginPath = item;\n } else if (Array.isArray(item) && item.length > 0 && typeof item[0] === 'string') {\n pluginPath = item[0];\n } else {\n return false;\n }\n\n return pluginPath.includes(join('ember-cli-htmlbars', 'lib', 'colocated-babel-plugin', sep));\n}\n\n// tests for the classic ember-cli-htmlbars-inline-precompile babel plugin\nexport function isInlinePrecompilePlugin(item: PluginItem) {\n if (typeof item === 'string') {\n return matchesSourceFile(item);\n }\n if (hasProperties(item) && (item as any)._parallelBabel) {\n return matchesSourceFile((item as any)._parallelBabel.requireFile);\n }\n if (Array.isArray(item) && item.length > 0) {\n if (typeof item[0] === 'string') {\n return matchesSourceFile(item[0]);\n }\n if (hasProperties(item[0]) && (item[0] as any)._parallelBabel) {\n return matchesSourceFile((item[0] as any)._parallelBabel.requireFile);\n }\n }\n return false;\n}\n\nfunction matchesSourceFile(filename: string) {\n return Boolean(htmlbarPathMatches.find(match => filename.endsWith(match)));\n}\n\nfunction hasProperties(item: any) {\n return item && (typeof item === 'object' || typeof item === 'function');\n}\n\nconst htmlbarPathMatches = [\n ['htmlbars-inline-precompile', 'index.js'].join(sep),\n ['htmlbars-inline-precompile', 'lib', 'require-from-worker.js'].join(sep),\n ['htmlbars-inline-precompile', 'index'].join(sep),\n ['htmlbars-inline-precompile', 'lib', 'require-from-worker'].join(sep),\n ['ember-cli-htmlbars', 'index.js'].join(sep),\n ['ember-cli-htmlbars', 'lib', 'require-from-worker.js'].join(sep),\n ['ember-cli-htmlbars', 'index'].join(sep),\n ['ember-cli-htmlbars', 'lib', 'require-from-worker'].join(sep),\n ['babel-plugin-ember-template-compilation', 'src', 'node-main.js'].join(sep),\n];\n"]}