qunitx 0.4.5 → 0.5.0
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/deno/cli.js +21 -0
- package/deno-bridge.js +16 -0
- package/deno.json +5 -0
- package/deno.lock +3513 -0
- package/lib/commands/generate.js +3 -3
- package/lib/commands/help.js +3 -3
- package/lib/commands/init.js +3 -3
- package/lib/commands/run/tests-in-browser.js +3 -3
- package/lib/commands/run.js +5 -6
- package/lib/setup/browser.js +3 -2
- package/lib/setup/config.js +1 -1
- package/lib/setup/fs-tree.js +1 -2
- package/lib/setup/web-server.js +5 -6
- package/lib/setup/write-output-static-files.js +1 -1
- package/lib/utils/listen-to-keyboard-key.js +0 -1
- package/lib/utils/parse-cli-flags.js +1 -1
- package/lib/utils/path-exists.js +1 -1
- package/package.json +19 -4
- package/shims/deno-assert.js +55 -0
- package/shims/deno.js +46 -0
- package/shims/nodejs-assert.js +10 -3
- package/shims/nodejs.js +2 -0
- package/test-output.log +922 -817
- package/cool.txt +0 -0
- package/lol.js +0 -4
package/deno/cli.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
import displayHelpOutput from '../lib/commands/help.js';
|
|
3
|
+
|
|
4
|
+
process.title = 'qunitx';
|
|
5
|
+
|
|
6
|
+
(async () => {
|
|
7
|
+
if (!process.argv[2]) {
|
|
8
|
+
return await displayHelpOutput();
|
|
9
|
+
} else if (['help', 'h', 'p', 'print'].includes(process.argv[2])) {
|
|
10
|
+
return await displayHelpOutput();
|
|
11
|
+
}
|
|
12
|
+
// else if (['new', 'n', 'g', 'generate'].includes(process.argv[2])) {
|
|
13
|
+
// return await generateTestFiles();
|
|
14
|
+
// } else if (['init'].includes(process.argv[2])) {
|
|
15
|
+
// return await initializeProject();
|
|
16
|
+
// }
|
|
17
|
+
|
|
18
|
+
// let config = await setupConfig();
|
|
19
|
+
|
|
20
|
+
// return await run(config);
|
|
21
|
+
})();
|
package/deno-bridge.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This tool turns package.json imports into deno.json. Also binary make const mappings(without npm:) npm packages to asset-map.json?
|
|
2
|
+
import fs from 'fs/promises';
|
|
3
|
+
|
|
4
|
+
const packageJSON = JSON.parse(await fs.readFile('./package.json', 'utf8'));
|
|
5
|
+
|
|
6
|
+
packageJSON.imports = packageJSON.imports || {};
|
|
7
|
+
|
|
8
|
+
const assetMapContents = Object.keys(packageJSON.imports).reduce((result, dependencyName) => {
|
|
9
|
+
Object.assign(result.imports, {
|
|
10
|
+
[dependencyName]: packageJSON.imports[dependencyName]['deno'] || packageJSON.imports[dependencyName]['default'] || packageJSON.imports[dependencyName]['browser']
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
return result;
|
|
14
|
+
}, { imports: {} });
|
|
15
|
+
|
|
16
|
+
await fs.writeFile('./deno.json', JSON.stringify(assetMapContents, null, 2), 'utf8');
|