supertape 12.12.2 → 13.0.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/ChangeLog CHANGED
@@ -1,3 +1,13 @@
1
+ 2026.05.05, v13.0.0
2
+
3
+ feature:
4
+ - 3d3e63c supertape: move out loaders
5
+
6
+ 2026.05.05, v12.12.3
7
+
8
+ fix:
9
+ - ac6ee50 supertape: loader: jsx
10
+
1
11
  2026.05.05, v12.12.2
2
12
 
3
13
  fix:
package/lib/env/index.js CHANGED
@@ -4,8 +4,8 @@ import justSnakeCase from 'just-snake-case';
4
4
  const isBool = (a) => typeof a === 'boolean';
5
5
  const {entries} = Object;
6
6
 
7
- const addCSSLoader = (a) => `"${a} --import supertape/css"`;
8
- const addJSXLoader = (a) => `"${a} --import supertape/jsx"`;
7
+ const addCSSLoader = (a) => `"${a} --import @supertape/loader-css"`;
8
+ const addJSXLoader = (a) => `"${a} --import @supertape/loader-jsx"`;
9
9
 
10
10
  const parseValue = (a) => {
11
11
  if (isBool(a))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supertape",
3
- "version": "12.12.2",
3
+ "version": "13.0.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "📼 Supertape simplest high speed test runner with superpowers",
6
6
  "homepage": "http://github.com/coderaiser/supertape",
@@ -53,6 +53,8 @@
53
53
  "@supertape/formatter-tap": "^4.0.0",
54
54
  "@supertape/formatter-time": "^3.0.0",
55
55
  "@supertape/operator-stub": "^4.0.0",
56
+ "@supertape/loader-jsx": "^1.0.0",
57
+ "@supertape/loader-css": "^1.0.0",
56
58
  "cli-progress": "^3.8.2",
57
59
  "flatted": "^3.3.1",
58
60
  "fullstore": "^4.0.0",
@@ -61,7 +63,6 @@
61
63
  "json-with-bigint": "^3.4.4",
62
64
  "just-snake-case": "^3.2.0",
63
65
  "once": "^1.4.0",
64
- "oxc-transform": "^0.129.0",
65
66
  "resolve": "^1.17.0",
66
67
  "stacktracey": "^2.1.7",
67
68
  "try-to-catch": "^4.0.0",
package/lib/loader/css.js DELETED
@@ -1,20 +0,0 @@
1
- export function resolve(specifier, context, nextResolve) {
2
- if (specifier.endsWith('.css'))
3
- return {
4
- url: new URL(specifier, context.parentURL).href,
5
- shortCircuit: true,
6
- };
7
-
8
- return nextResolve(specifier, context);
9
- }
10
-
11
- export function load(url, context, nextLoad) {
12
- if (url.endsWith('.css'))
13
- return {
14
- format: 'module',
15
- source: 'export default {};',
16
- shortCircuit: true,
17
- };
18
-
19
- return nextLoad(url, context);
20
- }
package/lib/loader/jsx.js DELETED
@@ -1,40 +0,0 @@
1
- import {transformSync} from 'oxc-transform';
2
-
3
- export function resolve(specifier, context, nextResolve) {
4
- if (specifier.endsWith('.jsx'))
5
- return {
6
- url: new URL(specifier, context.parentURL).href,
7
- shortCircuit: true,
8
- };
9
-
10
- return nextResolve(specifier, context);
11
- }
12
-
13
- export function load(url, context, nextLoad) {
14
- if (url.endsWith('.jsx') || url.endsWith('.js')) {
15
- if (url.includes('node_modules'))
16
- return nextLoad(url, context);
17
-
18
- const {source} = nextLoad(url, {
19
- format: 'module',
20
- });
21
-
22
- return {
23
- format: 'module',
24
- source: jsxToJs(String(source)),
25
- shortCircuit: true,
26
- };
27
- }
28
-
29
- return nextLoad(url, context);
30
- }
31
-
32
- export function jsxToJs(source) {
33
- const {code} = transformSync('__supertape.js', source, {
34
- jsx: {
35
- runtime: 'automatic',
36
- },
37
- });
38
-
39
- return code;
40
- }
@@ -1,6 +0,0 @@
1
- import {registerHooks} from 'node:module';
2
- import * as cssLoaderUrl from './css.js';
3
- import * as jsxLoaderUrl from './jsx.js';
4
-
5
- registerHooks(jsxLoaderUrl);
6
- registerHooks(cssLoaderUrl);
@@ -1,4 +0,0 @@
1
- import {registerHooks} from 'node:module';
2
- import * as jsxLoaderUrl from './jsx.js';
3
-
4
- registerHooks(jsxLoaderUrl);