warpo 2.0.1 → 2.1.0-beta-2
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/create/__warpo_create.ts +5 -0
- package/create/index.ts +5 -0
- package/create/resolveModule.ts +17 -0
- package/create/tsconfig.json +4 -0
- package/dist/warpo.js +1 -0
- package/package.json +16 -5
- package/types/warpo/index.d.ts +4 -0
package/create/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (C) 2025 wasm-ecosystem
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import * as api from "./__warpo_create";
|
|
5
|
+
|
|
6
|
+
export class ModuleResolve {
|
|
7
|
+
packageName!: string;
|
|
8
|
+
private packagePath: string | null = null;
|
|
9
|
+
setPackagePath(packagePath: string): void {
|
|
10
|
+
this.packagePath = packagePath;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type Fn = (task: ModuleResolve) => void;
|
|
15
|
+
export function onModuleResolve(fn: Fn): void {
|
|
16
|
+
api.onModuleResolve(fn.index, idof<ModuleResolve>());
|
|
17
|
+
}
|
package/dist/warpo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warpo",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0-beta-2",
|
|
4
4
|
"description": "next generation AssemblyScript compiler with optimizations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,13 +11,19 @@
|
|
|
11
11
|
"build:cpp": "cmake -S . -B build && cmake --build build --parallel",
|
|
12
12
|
"build": "npm run build:ts && npm run build:cpp",
|
|
13
13
|
"test:ut": "cd build && ctest --output-on-failure",
|
|
14
|
-
"test:as:snapshot": "./build/tests/frontend/warpo_frontend_test",
|
|
14
|
+
"test:as:snapshot": "cross-env-shell ./build/tests/frontend/warpo_frontend_test",
|
|
15
15
|
"test:opt:snapshot": "node tests/snapshot_diff/index.mjs",
|
|
16
16
|
"test:bootstrap:debug": "./tests/bootstrap/debug.sh",
|
|
17
17
|
"test:bootstrap:release": "./tests/bootstrap/release.sh",
|
|
18
|
-
"test": "
|
|
18
|
+
"test:debug_symbol": "cross-env-shell ./build/tests/DebugSymbol/TestDebugSymbol",
|
|
19
|
+
"test:debug_symbol:update": "cross-env-shell build/tests/DebugSymbol/TestDebugSymbol --update-fixtures",
|
|
20
|
+
"test:driver": "node tests/driver/index.mjs",
|
|
21
|
+
"test": "npm run test:ut && npm run test:as:snapshot && npm run test:opt:snapshot && npm run test:driver && npm run test:debug_symbol && npm run test:bootstrap:debug && npm run test:bootstrap:release",
|
|
19
22
|
"docs:dev": "vitepress dev docs",
|
|
20
|
-
"docs:build": "vitepress build docs"
|
|
23
|
+
"docs:build": "vitepress build docs",
|
|
24
|
+
"prettier": "prettier --check .",
|
|
25
|
+
"prettier:fix": "prettier --write .",
|
|
26
|
+
"cspell": "cspell ."
|
|
21
27
|
},
|
|
22
28
|
"license": "Apache-2.0",
|
|
23
29
|
"keywords": [
|
|
@@ -28,6 +34,7 @@
|
|
|
28
34
|
],
|
|
29
35
|
"author": "congcong.cai@bmw.com",
|
|
30
36
|
"files": [
|
|
37
|
+
"create",
|
|
31
38
|
"dist",
|
|
32
39
|
"types",
|
|
33
40
|
"tsconfig-warpo.json",
|
|
@@ -35,10 +42,14 @@
|
|
|
35
42
|
"assemblyscript/std/assembly/index.d.ts"
|
|
36
43
|
],
|
|
37
44
|
"devDependencies": {
|
|
45
|
+
"@assemblyscript/loader": "^0.28.9",
|
|
38
46
|
"@types/node": "^22.15.21",
|
|
39
47
|
"assemblyscript": "^0.28.4",
|
|
40
48
|
"assemblyscript-prettier": "^3.0.1",
|
|
41
|
-
"
|
|
49
|
+
"chalk": "^5.6.2",
|
|
50
|
+
"cross-env": "^10.1.0",
|
|
51
|
+
"cspell": "^9.3.0",
|
|
52
|
+
"diff": "^8.0.0",
|
|
42
53
|
"prettier": "^3.6.2",
|
|
43
54
|
"typescript": "^5.8.3",
|
|
44
55
|
"vitepress": "^1.6.3"
|