functionalscript 0.14.2 → 0.14.4

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.
@@ -18,7 +18,7 @@ export declare const playwright = "1.60.0";
18
18
  export declare const rust = "1.95.0";
19
19
  export declare const node: {
20
20
  readonly default: "26.1.0";
21
- readonly others: readonly ["20.20.2", "22.22.2", "24.15.0"];
21
+ readonly others: readonly ["22.22.2", "24.15.0"];
22
22
  };
23
23
  export declare const wasmtime = "44.0.1";
24
24
  export declare const wasmer = "7.1.0";
@@ -24,7 +24,7 @@ export const rust = '1.95.0';
24
24
  // https://nodejs.org/en/download
25
25
  export const node = {
26
26
  default: '26.1.0',
27
- others: ['20.20.2', '22.22.2', '24.15.0'],
27
+ others: ['22.22.2', '24.15.0'],
28
28
  };
29
29
  // https://github.com/bytecodealliance/wasmtime/releases
30
30
  export const wasmtime = '44.0.1';
@@ -13,11 +13,11 @@ export const nodeTests = (version) => (extra) => basicNode(version)([
13
13
  ...extra,
14
14
  ]);
15
15
  const findTgz = (v) => v === 'windows' ? '(Get-ChildItem *.tgz).FullName' : './*.tgz';
16
- const nodeTest = (v) => major(v) === '20' ? 'run test20' : 'test';
16
+ // const nodeTest = (v: string) => major(v) === '20' ? 'run test20' : 'test'
17
17
  const nodeSteps = (v) => [
18
18
  install(installNode(v)),
19
19
  test({ run: 'npm ci' }),
20
- test({ run: `npm ${nodeTest(v)}` }),
20
+ test({ run: 'npm t' }),
21
21
  ];
22
22
  export const nodeVersions = Object.fromEntries(node.others.map(v => [
23
23
  `node${major(v)}`,
@@ -1,14 +1,23 @@
1
+ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
+ });
6
+ }
7
+ return path;
8
+ };
1
9
  import { io } from "../../io/module.js";
2
10
  import { loadModuleMap } from "../module.f.js";
3
11
  import { isTest, parseTestSet } from "./module.f.js";
4
12
  import * as nodeTest from 'node:test';
13
+ import { playwright } from "../../ci/config/module.f.js";
5
14
  const isBun = typeof Bun !== 'undefined';
6
15
  const isPlaywright = typeof process !== 'undefined' && process?.env?.PLAYWRIGHT_TEST !== undefined;
7
16
  const createFramework = (fw) => (prefix, f) => fw.test(prefix, t => f((name, v) => t.test(name, v)));
8
17
  // Bun doesn't support nested tests yet.
9
18
  const createBunFramework = (fw) => (prefix, f) => f((name, v) => fw.test(`${prefix}: ${name}`, v));
10
19
  const createPlaywrightFramework = async () => {
11
- const pwTest = (await import('@playwright/test')).test;
20
+ const pwTest = (await import(__rewriteRelativeImportExtension(`@playwright/test@${playwright}`))).test;
12
21
  return (prefix, f) => f((name, v) => pwTest(`${prefix}: ${name}`, v));
13
22
  };
14
23
  const framework = isPlaywright ? await createPlaywrightFramework() :
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.14.2",
3
+ "version": "0.14.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "**/*.js",
@@ -9,7 +9,6 @@
9
9
  "description": "FunctionalScript is a purely functional subset of JavaScript",
10
10
  "scripts": {
11
11
  "prepack": "tsc --NoEmit false",
12
- "test20": "npm run prepack && node --test",
13
12
  "test": "tsc && node --test --experimental-strip-types --experimental-test-coverage --test-coverage-include=**/module.f.ts",
14
13
  "index": "node ./fs/fjs/module.ts r ./fs/dev/index/module.f.ts",
15
14
  "fst": "node ./fs/fjs/module.ts t",