Skip to content

Commit 5b85fce

Browse files
committed
cleanup
Signed-off-by: Karthik Ganeshram <karthik.ganeshram@fermyon.com>
1 parent d3c598b commit 5b85fce

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,6 @@ npm install
314314
npm run build
315315
```
316316

317-
Before being able to use `componetize-js` (ex. via `npm link`, from `jco`), you'll need to run:
318-
319317
To clean up a local installation (i.e. remove the installation of StarlingMonkey):
320318

321319
```console

src/componentize.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ export async function componentize(
240240
sourcePath = maybeWindowsPath(sourcePath);
241241
let workspacePrefix = dirname(sourcePath);
242242

243-
243+
// If the source path is within the current working directory, strip the
244+
// cwd as a prefix from the source path, and remap the paths seen by the
245+
// component to be relative to the current working directory.
246+
// This only works in wizer.
244247
if (!useOriginalSourceFile) {
245248
workspacePrefix = sourcesDir;
246249
sourcePath = sourceName;

test/bindings.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ suite('Bindings', async () => {
1616
const bindingsCases = await readdir(new URL('./cases', import.meta.url));
1717

1818
for (const name of bindingsCases) {
19-
const testFn = test.concurrent;
20-
testFn(name, async () => {
19+
test.concurrent(name, async () => {
2120
const source = await readFile(
2221
new URL(`./cases/${name}/source.js`, import.meta.url),
2322
'utf8',

test/builtins.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ suite('Builtins', async () => {
1818

1919
for (const filename of builtins) {
2020
const name = filename.slice(0, -3);
21-
const testFn = test.concurrent;
22-
testFn(name, async () => {
21+
test.concurrent(name, async () => {
2322
const {
2423
source,
2524
test: runTest,
@@ -37,7 +36,6 @@ suite('Builtins', async () => {
3736
`,
3837
{
3938
sourceName: `${name}.js`,
40-
// also test the debug build while we are about it
4139
debugBuild: DEBUG_TEST_ENABLED,
4240
enableFeatures,
4341
disableFeatures: maybeLogging(disableFeatures),

test/builtins/performance.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function test(run) {
2222
ok(stderr.includes(' ms'));
2323
const time = Number(stderr.split(' ms')[0]);
2424

25-
if (time > 0.5) {
26-
throw new Error('took more than half a millisecond - ' + time + ' ms');
25+
if (time > 5) {
26+
throw new Error('took more than 5 milliseconds - ' + time + ' ms');
2727
}
2828
}

0 commit comments

Comments
 (0)