@tsonic/js 10.0.25 → 10.0.27

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.
Files changed (2) hide show
  1. package/README.md +26 -25
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,31 +1,47 @@
1
1
  # @tsonic/js
2
2
 
3
- JavaScript-style APIs for **Tsonic** (TypeScript → .NET).
3
+ JavaScript-style APIs for **Tsonic**.
4
+
5
+ This package is part of Tsonic: https://tsonic.org.
4
6
 
5
7
  Use `@tsonic/js` when you want a JS-like standard library (`console`, `JSON`, `Map`, `Set`, `Date`, timers, etc.) while still compiling to a native binary with `tsonic`.
6
8
 
7
- ## Quick Start
9
+ ## Prerequisites
8
10
 
9
- ### New project
11
+ - Install the .NET 10 SDK (required by Tsonic): https://dotnet.microsoft.com/download
12
+ - Verify: `dotnet --version`
13
+
14
+ ## Quick Start
10
15
 
11
16
  ```bash
12
17
  mkdir my-app && cd my-app
13
- tsonic init
14
- tsonic add npm @tsonic/js
18
+ npx --yes tsonic@latest init
19
+ npx --yes tsonic@latest add npm @tsonic/js
20
+
21
+ # Replace the default App.ts with a JSRuntime example
22
+ cat > packages/my-app/src/App.ts <<'EOF'
23
+ import { console, JSON } from "@tsonic/js/index.js";
24
+
25
+ export function main(): void {
26
+ const value = JSON.parse<{ x: number }>('{"x": 1}');
27
+ console.log(JSON.stringify(value));
28
+ }
29
+ EOF
30
+
15
31
  npm run dev
16
32
  ```
17
33
 
18
- ### Existing project
34
+ ## Existing project
19
35
 
20
36
  ```bash
21
- tsonic add npm @tsonic/js
37
+ npx --yes tsonic@latest add npm @tsonic/js
22
38
  ```
23
39
 
24
40
  ## Versioning
25
41
 
26
- This repo is versioned by **.NET major**:
42
+ This repo is versioned by runtime major:
27
43
 
28
- - **.NET 10** → `versions/10/` → npm: `@tsonic/js@10.x`
44
+ - `10` → `versions/10/` → npm: `@tsonic/js@10.x`
29
45
 
30
46
  When publishing, run: `npm publish versions/10 --access public`
31
47
 
@@ -95,22 +111,7 @@ If you want Node-style modules (`fs`, `path`, `crypto`, `http`, …), use `@tson
95
111
 
96
112
  ## Development
97
113
 
98
- ### Regenerating Types
99
-
100
- To regenerate TypeScript declarations:
101
-
102
- ```bash
103
- ./__build/scripts/generate.sh
104
- ```
105
-
106
- **Prerequisites:**
107
- - .NET 10 SDK installed
108
- - `tsbindgen` repository at `../tsbindgen`
109
- - `js-runtime` repository at `../js-runtime` (built with `dotnet build -c Release`)
110
-
111
- **Environment variables:**
112
- - `DOTNET_VERSION` - .NET runtime version (default: `10.0.0`)
113
- - `DOTNET_HOME` - .NET installation directory (default: `$HOME/.dotnet`)
114
+ See `__build/` for regeneration scripts.
114
115
 
115
116
  ## License
116
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsonic/js",
3
- "version": "10.0.25",
3
+ "version": "10.0.27",
4
4
  "description": "TypeScript type definitions for JavaScript Runtime (JSRuntime) library",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -20,7 +20,7 @@
20
20
  "url": "https://github.com/tsoniclang/js.git"
21
21
  },
22
22
  "peerDependencies": {
23
- "@tsonic/dotnet": "10.0.25",
24
- "@tsonic/core": "10.0.25"
23
+ "@tsonic/dotnet": "10.0.27",
24
+ "@tsonic/core": "10.0.27"
25
25
  }
26
26
  }