diff --git a/packages/ember-repl/addon/package.json b/packages/ember-repl/addon/package.json index ec8bbcd98..4d9595831 100644 --- a/packages/ember-repl/addon/package.json +++ b/packages/ember-repl/addon/package.json @@ -61,7 +61,6 @@ "scripts": { "build": "concurrently 'npm:build:*'", "build:js": "rollup --config", - "build:types": "tsc --emitDeclarationOnly --noEmit false", "lint:types": "tsc --noEmit", "lint:fix": "pnpm -w exec lint fix", "start": "rollup --config --watch", @@ -72,7 +71,8 @@ "lint:hbs": "pnpm -w exec lint hbs", "lint:hbs:fix": "pnpm -w exec lint hbs:fix", "lint:prettier:fix": "pnpm -w exec lint prettier:fix", - "lint:prettier": "pnpm -w exec lint prettier" + "lint:prettier": "pnpm -w exec lint prettier", + "build:types": "tsc --emitDeclarationOnly --noEmit false" }, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5", @@ -84,7 +84,7 @@ "broccoli-file-creator": "^2.1.1", "change-case": "^5.3.0", "common-tags": "^1.8.2", - "content-tag": "github:NullVoxPopuli/content-tag#browser-support-dist", + "content-tag": "^1.2.1", "line-column": "^1.0.2", "magic-string": "^0.30.5", "mdast": "^3.0.0", diff --git a/packages/ember-repl/addon/src/browser/gjs.ts b/packages/ember-repl/addon/src/browser/gjs.ts index 12b1d08c7..1e4b86eee 100644 --- a/packages/ember-repl/addon/src/browser/gjs.ts +++ b/packages/ember-repl/addon/src/browser/gjs.ts @@ -6,17 +6,19 @@ import type { Babel } from './types.ts'; const compiler = importSync('ember-source/dist/ember-template-compiler.js'); -import { createPreprocessor } from 'content-tag/standalone'; - -let processor; +let processor: any; let fetchingPromise: Promise; export async function preprocess(input: string, name: string): Promise { if (!fetchingPromise) { - fetchingPromise = createPreprocessor(); + fetchingPromise = import('content-tag'); } - processor = await fetchingPromise; + if (!processor) { + let { Preprocessor } = await fetchingPromise; + + processor = new Preprocessor(); + } return processor.process(input, `${name}.js`); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2369ae98c..07cccdb75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1332,8 +1332,8 @@ importers: specifier: ^1.8.2 version: 1.8.2 content-tag: - specifier: github:NullVoxPopuli/content-tag#browser-support-dist - version: github.com/NullVoxPopuli/content-tag/821f9d74c586108e2f3b4938ebfcf9297794e1f2 + specifier: ^1.2.1 + version: 1.2.1 line-column: specifier: ^1.0.2 version: 1.0.2 @@ -11091,6 +11091,10 @@ packages: resolution: {integrity: sha512-AZkfc6TUmW+/RbZJioPzOQPAHHXqyqK4B0GNckJDjBAPK3SyGrMfn21bfFky/qwi5uoLph5sjAHUkO3CL6/IgQ==} dev: true + /content-tag@1.2.1: + resolution: {integrity: sha512-aKOsM+GojHMvRuqOa+qamATA3IEK9QksXcIX2NSGHpU5euNhrg6mZFT3Z7kDuNz55sH9NRPJKqeGhkhaq9ED2w==} + dev: false + /content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} @@ -23583,7 +23587,7 @@ packages: broccoli-file-creator: 2.1.1 change-case: 5.3.0 common-tags: 1.8.2 - content-tag: github.com/NullVoxPopuli/content-tag/821f9d74c586108e2f3b4938ebfcf9297794e1f2 + content-tag: 1.2.1 ember-resources: 6.4.2(@ember/test-waiters@3.1.0)(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.2.1)(ember-source@5.4.0) ember-source: 5.4.0(@babel/core@7.23.6)(@glimmer/component@1.1.2)(@glint/template@1.2.1)(webpack@5.89.0) line-column: 1.0.2 @@ -23603,12 +23607,6 @@ packages: - supports-color dev: false - github.com/NullVoxPopuli/content-tag/821f9d74c586108e2f3b4938ebfcf9297794e1f2: - resolution: {tarball: https://codeload.github.com/NullVoxPopuli/content-tag/tar.gz/821f9d74c586108e2f3b4938ebfcf9297794e1f2} - name: content-tag - version: 1.1.2 - dev: false - github.com/discourse/ember-route-template/8babed213f24d9f8dd38844e57cc744e886ee398: resolution: {tarball: https://codeload.github.com/discourse/ember-route-template/tar.gz/8babed213f24d9f8dd38844e57cc744e886ee398} name: ember-route-template