functionalscript 0.0.586 → 0.0.588

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.
@@ -10,21 +10,7 @@ on:
10
10
  pull_request:
11
11
 
12
12
  jobs:
13
- locks:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v2
17
- - uses: actions/setup-node@v2
18
- with:
19
- node-version: 22
20
- - run: npm install
21
- - uses: actions/upload-artifact@v4
22
- with:
23
- name: package-lock.json
24
- path: package-lock.json
25
-
26
13
  node:
27
- needs: locks
28
14
  runs-on: ubuntu-latest
29
15
 
30
16
  strategy:
@@ -37,9 +23,6 @@ jobs:
37
23
  - uses: actions/setup-node@v2
38
24
  with:
39
25
  node-version: ${{ matrix.node-version }}
40
- - uses: actions/download-artifact@v4
41
- with:
42
- name: package-lock.json
43
26
  - run: npm ci
44
27
  - run: npm test
45
28
  - run: npm run version
@@ -70,7 +53,6 @@ jobs:
70
53
  - run: /home/runner/.bun/bin/bun ./dev/test.mjs
71
54
 
72
55
  COM:
73
- needs: locks
74
56
  strategy:
75
57
  matrix:
76
58
  os: ['ubuntu-latest', 'windows-latest', 'macos-14']
@@ -82,9 +64,6 @@ jobs:
82
64
  - uses: actions/setup-node@v2
83
65
  with:
84
66
  node-version: 22
85
- - uses: actions/download-artifact@v4
86
- with:
87
- name: package-lock.json
88
67
  - uses: actions/setup-dotnet@v3
89
68
  with:
90
69
  dotnet-version: 9
package/Cargo.lock ADDED
@@ -0,0 +1,14 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "nanocom"
7
+ version = "0.2.1"
8
+
9
+ [[package]]
10
+ name = "testrust"
11
+ version = "0.1.0"
12
+ dependencies = [
13
+ "nanocom",
14
+ ]
package/README.md CHANGED
@@ -31,6 +31,7 @@ In FunctionalScript:
31
31
  ## Applications
32
32
 
33
33
  FunctionalScript code can be used:
34
+
34
35
  - in any JavaScript/TypeScript application,
35
36
  - as a JSON with expressions,
36
37
  - as a query language.
@@ -0,0 +1,7 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "com"
7
+ version = "0.1.0"
package/issues/README.md CHANGED
@@ -1,32 +1,5 @@
1
1
  # Issues
2
2
 
3
- ## Allow Debugging During Test Run
4
-
5
- Currently, we read files as strings and then parse them as functions. See [dev/test.mjs](dev/test.mjs). In this case, the debugger doesn't know about the source code and can't debug the functions. The main reason for loading modules as functions was that Deno v1 didn't support `.cjs` files. However, Deno v2 supports them.
6
-
7
- We can fix the issue by changing our test runner. The test runner will scan all directories, find all `test.f.cjs` files, and then load them using `require`.
8
-
9
- **Note:** In this case, we will drop support for Deno v1.
10
-
11
- ## Creating `./index.f.cjs`
12
-
13
- Currently, we regenerate [./index.f.cjs](./index.f.cjs) using `npm run index` during CD (publishing). However, we don't check in CI if it was regenerated. The idea is that CI should check if all generated files in Git are updated:
14
- - [package.json](./package.json) `version` property
15
- - [jsr.json](./jsr.json), `version` property
16
- - [index.f.cjs](./index.f.cjs)
17
-
18
- `version` property should be
19
- - `version` calculated on a `main` branch.
20
-
21
- ## Publishing
22
-
23
- Before publishing, we have to be sure that
24
- 1. [index.f.cjs](./index.f.cjs) is up to date
25
- 2. `version` is updated in [jsr.json](./jsr.json) and [package.json](./package.json).
26
-
27
- ## Switching to ESM
28
-
29
- Currently, the biggest obstacle to using ESM is that we cannot make bundles on ESM modules without an FS parser.
30
- The solution is to deploy ESM modules to HTTPS.
31
-
32
- ## Can we get rid of `jsr.json` and use only `package.json`?
3
+ 1. [test-debug](./test-debug.md).
4
+ 2. [esm](./esm.md)
5
+ 3. [publish](publish.md)
package/issues/esm.md ADDED
@@ -0,0 +1,8 @@
1
+ # Switching to ESM
2
+
3
+ We need ESM for such systems like Deno, JSR and browsers.
4
+
5
+ Currently, the biggest obstacle to using ESM is that we cannot make bundles on ESM modules without an FS parser.
6
+ The solution is to deploy ESM modules to HTTPS.
7
+
8
+ This task depends on [test-debug](./test-debug.md).
@@ -0,0 +1,45 @@
1
+ # Publishing Packages
2
+
3
+ We are targeting the following systems:
4
+
5
+ - JS:
6
+ - NPM
7
+ - JSR
8
+ - https://esm.sh/ optional
9
+ - Rust:
10
+ - https://crates.io/
11
+
12
+ ## Creating `./index.f.cjs`
13
+
14
+ Currently, we regenerate [./index.f.cjs](./index.f.cjs) using `npm run index` during CD (publishing). However, we don't check in CI if it was regenerated. The idea is that CI should check if all generated files in Git are updated:
15
+
16
+ - [package.json](./package.json) `version` property
17
+ - [jsr.json](./jsr.json), `version` property
18
+ - [index.f.cjs](./index.f.cjs)
19
+
20
+ `version` property should be `version` calculated on a `main` branch.
21
+
22
+ We may abandon the idea to publish on every commit on `main`. Instead, we will publish only we when we update a version in the `main` branch. This strategy can also work for Rust packages. The idea is that people can still reference from Git if they would like to have a not-published version of a package. We will still release in CI but only when there is a new version.
23
+
24
+ ## Publishing
25
+
26
+ Before publishing, we have to be sure that
27
+
28
+ 1. [index.f.cjs](./index.f.cjs) is up to date
29
+ 2. `version` is updated in [jsr.json](./jsr.json) and [package.json](./package.json).
30
+
31
+ ## CI Jobs
32
+
33
+ ### 1. Publishing (merge to `main`)
34
+
35
+ Check if the version is new, then publish.
36
+
37
+ ### 2. CI
38
+
39
+ Errors:
40
+
41
+ - correct `index.f.mjs` is merged.
42
+
43
+ Warnings (not blocking CI):
44
+
45
+ - out of date lock files, such as `package-lock.json` and `Cargo.lock`.
@@ -0,0 +1,12 @@
1
+ # Allow Debugging During Test Run
2
+
3
+ Currently, we read files as strings and then parse them as functions. See [dev/test.mjs](../dev/test.mjs). In this case, the
4
+ debugger doesn't know about the source code and can't debug the functions. The main reason for loading modules as functions was
5
+ that Deno v1 didn't support `.cjs` files. However, Deno v2 supports them.
6
+
7
+ We can fix the issue by changing our test runner. The test runner will scan all directories, find all `test.f.cjs` files, and
8
+ then load them using `require`.
9
+
10
+ Limitations: we will not able to check test module dependencies to have module coverage but, anyway, without a parser, we are not able to get full coverage. So, we can drop support for it right now.
11
+
12
+ **Note:** In this case, we may drop support for Deno v1. At least until we switch to [ESM](./esm.md).
package/jsr.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@functionalscript/functionalscript",
3
- "version": "0.0.586",
3
+ "version": "0.0.588",
4
4
  "exports": "./index.f.cjs"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "functionalscript",
3
- "version": "0.0.586",
3
+ "version": "0.0.588",
4
4
  "description": "FunctionalScript is a functional subset of JavaScript",
5
5
  "main": "index.f.cjs",
6
6
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "homepage": "https://github.com/functionalscript/functionalscript#readme",
33
33
  "devDependencies": {
34
- "@types/node": "^22.10.0",
34
+ "@types/node": "^22.10.1",
35
35
  "typescript": "^5.7.2"
36
36
  }
37
37
  }