We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e712ae3 commit 7c86dbdCopy full SHA for 7c86dbd
bin/run-types-tests.mjs
@@ -4,8 +4,9 @@ import { execSync } from 'child_process';
4
import { execa } from 'execa';
5
import yaml from 'js-yaml';
6
import { resolve } from 'path';
7
+import { fileURLToPath } from 'url';
8
-const __dirname = new URL('.', import.meta.url).pathname;
9
+const __dirname = fileURLToPath(new URL('.', import.meta.url));
10
const root = resolve(__dirname, '..');
11
12
async function main() {
packages/@glimmer-workspace/build/lib/config.js
@@ -110,7 +110,7 @@ export function typescript(pkg, config) {
110
const EXTERNAL_OPTIONS = [
111
['is', ['tslib', '@glimmer/local-debug-flags'], 'inline'],
112
['is', ['@handlebars/parser', 'simple-html-tokenizer', 'babel-plugin-debug-macros'], 'external'],
113
- ['startsWith', ['.', '/', '#', '@babel/runtime/'], 'inline'],
+ ['startsWith', ['.', '/', '#', '@babel/runtime/', process.cwd().replace(/\\/gu, '/')], 'inline'],
114
['startsWith', ['@glimmer/', '@simple-dom/', '@babel/', 'node:'], 'external'],
115
];
116
@@ -119,6 +119,7 @@ const EXTERNAL_OPTIONS = [
119
* @returns {boolean | null}
120
*/
121
function matchExternals(id) {
122
+ id = id.replace(/\\/gu, '/');
123
for (const [operator, prefixes, kind] of EXTERNAL_OPTIONS) {
124
const result = match(id, operator, prefixes);
125
0 commit comments