From 781ad32f9d8502100d38f50628a8eb15f85c3f34 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:55:10 -0500 Subject: [PATCH] Upgrade content-tag --- .../-private/environment/preprocess.ts | 4 ++-- packages/environment-ember-template-imports/package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/environment-ember-template-imports/-private/environment/preprocess.ts b/packages/environment-ember-template-imports/-private/environment/preprocess.ts index c77606425..7bfe19380 100644 --- a/packages/environment-ember-template-imports/-private/environment/preprocess.ts +++ b/packages/environment-ember-template-imports/-private/environment/preprocess.ts @@ -4,7 +4,7 @@ import { GLOBAL_TAG, PreprocessData, TemplateLocation } from './common'; const TEMPLATE_START = `[${GLOBAL_TAG}\``; const TEMPLATE_END = '`]'; -// content-tag 1.2.2: +// content-tag 1.2.2+ (including v2+): // The current file is a CommonJS module whose imports will produce 'require' calls; // however, the referenced file is an ECMAScript module and cannot be imported with 'require'. // Consider writing a dynamic 'import("content-tag")' call instead. @@ -26,7 +26,7 @@ const p = new Preprocessor(); export const preprocess: GlintExtensionPreprocess = (source, path) => { // NOTE: https://github.com/embroider-build/content-tag/issues/45 // All indicies are byte-index, not char-index. - let templates = p.parse(source, path); + let templates = p.parse(source, { filename: path }); let templateLocations: Array = []; let segments: Array = []; diff --git a/packages/environment-ember-template-imports/package.json b/packages/environment-ember-template-imports/package.json index 52b1fae72..4de8ec3b5 100644 --- a/packages/environment-ember-template-imports/package.json +++ b/packages/environment-ember-template-imports/package.json @@ -27,7 +27,7 @@ "globals/index.d.ts" ], "dependencies": { - "content-tag": "^1.2.2" + "content-tag": "^2.0.1" }, "peerDependencies": { "@glint/environment-ember-loose": "^1.3.0", diff --git a/yarn.lock b/yarn.lock index 2c6a5773e..b51b332de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5235,10 +5235,10 @@ content-disposition@0.5.4: dependencies: safe-buffer "5.2.1" -content-tag@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/content-tag/-/content-tag-1.2.2.tgz#8cbc3cdb9957a81f7c425b138e334330dd6fd78d" - integrity sha512-9guqKIx2H+78N17otBpl8yLZbQGL5q1vBO/jDb3gF2JjixtcVpC62jDUNxjVMNoaZ09oxRX84ZOD6VX02qkVvg== +content-tag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/content-tag/-/content-tag-2.0.1.tgz#0b908ed97e13df60b019039713ab63f1b73f2b22" + integrity sha512-jxsETSDs5NbNwyiDuIp672fUMhUyu8Qxc5MOBOJOcgW/fQESI6o5K1LBDrnEE7Bh810a685lWEZHTF4jQYGEEw== content-type@~1.0.4: version "1.0.5"