steel-frame 7.0.4 → 7.1.1
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/README.md +4 -0
- package/build/babel-plugin/mesh.js +7 -1
- package/build/cli/lib/process-args.d.ts +1 -0
- package/build/cli/lib/process-args.js +2 -1
- package/build/cli/run.js +12 -8
- package/build/cli/vite-plugins/jsx.d.ts +4 -1
- package/build/cli/vite-plugins/jsx.js +7 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -133,6 +133,10 @@ We respect semantic versioning:
|
|
|
133
133
|
- A minor version is increased when we add functionality.
|
|
134
134
|
- Patch version is increased when we fix bugs.
|
|
135
135
|
|
|
136
|
+
### 7.1
|
|
137
|
+
|
|
138
|
+
- Add support for ARIA attributtes.
|
|
139
|
+
|
|
136
140
|
### 7.0
|
|
137
141
|
|
|
138
142
|
- Add `debounced` and `field` functions, which extend the reativity system.
|
|
@@ -515,7 +515,13 @@ export function ignoreParams(path, internal, allowReactiveId, restrictDestructio
|
|
|
515
515
|
// param is object destruction
|
|
516
516
|
else if (path.isObjectPattern()) {
|
|
517
517
|
if (restrictDestruction) {
|
|
518
|
-
|
|
518
|
+
for (const element of path.get("properties")) {
|
|
519
|
+
const key = element.get("key");
|
|
520
|
+
/* istanbul ignore else */
|
|
521
|
+
if (key.isIdentifier() && isReactiveName(key.node.name, internal)) {
|
|
522
|
+
err(Errors.RulesOfVasille, key, "Extract reactive fields inside the function body", internal);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
519
525
|
}
|
|
520
526
|
ignoreObjectPattern(path, internal);
|
|
521
527
|
}
|
|
@@ -4,6 +4,7 @@ export async function processArgs() {
|
|
|
4
4
|
function checkArg(name) {
|
|
5
5
|
return argv.indexOf(name) >= 2;
|
|
6
6
|
}
|
|
7
|
+
const v4Naming = checkArg("v4-naming");
|
|
7
8
|
let dev = checkArg("dev");
|
|
8
9
|
let build = checkArg("build");
|
|
9
10
|
let spa = checkArg("spa");
|
|
@@ -88,5 +89,5 @@ export async function processArgs() {
|
|
|
88
89
|
mdHtml = target === "md+html";
|
|
89
90
|
help = true;
|
|
90
91
|
}
|
|
91
|
-
return { dev, build, spa, ssg, help, lib, components, md, mdHtml };
|
|
92
|
+
return { dev, build, spa, ssg, help, lib, components, md, mdHtml, v4Naming };
|
|
92
93
|
}
|
package/build/cli/run.js
CHANGED
|
@@ -16,7 +16,8 @@ import { startProxyServer } from "./proxy/dev-proxy.js";
|
|
|
16
16
|
import { compileComponentsLib, compileLib, watchLib } from "./lib/compile-lib.js";
|
|
17
17
|
async function run() {
|
|
18
18
|
const { routerDir, pagesDir, srcDir } = workingDirs();
|
|
19
|
-
const { build, dev, spa, ssg, help, lib, components, md, mdHtml } = await processArgs();
|
|
19
|
+
const { build, dev, spa, ssg, help, lib, components, md, mdHtml, v4Naming } = await processArgs();
|
|
20
|
+
const options = { v4Naming };
|
|
20
21
|
const resolve = {
|
|
21
22
|
alias: {
|
|
22
23
|
"@": srcDir,
|
|
@@ -43,7 +44,7 @@ async function run() {
|
|
|
43
44
|
},
|
|
44
45
|
plugins: [
|
|
45
46
|
await indexPlugin(routerDir, pagesDir, "vasille-web"),
|
|
46
|
-
...getVitePlugins("vasille-web"),
|
|
47
|
+
...getVitePlugins("vasille-web", options),
|
|
47
48
|
compress(),
|
|
48
49
|
],
|
|
49
50
|
resolve,
|
|
@@ -166,12 +167,15 @@ async function run() {
|
|
|
166
167
|
command: "serve",
|
|
167
168
|
plugins: [
|
|
168
169
|
await indexPlugin(routerDir, pagesDir, "vasille-web/dev"),
|
|
169
|
-
...getVitePlugins("vasille-web/dev",
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
...getVitePlugins("vasille-web/dev", {
|
|
171
|
+
...options,
|
|
172
|
+
errorsHandler: reports => {
|
|
173
|
+
ideServer.clients.forEach(client => {
|
|
174
|
+
if (client.readyState === WebSocket.OPEN) {
|
|
175
|
+
client.send(JSON.stringify(["reportErrors", reports]));
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
},
|
|
175
179
|
}),
|
|
176
180
|
inspect(),
|
|
177
181
|
],
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { CompilationErrorReporter } from "../../babel-plugin/index.js";
|
|
2
|
-
export declare function getVitePlugins(target: "vasille-web/dev" | "vasille-web" | "vasille-web/ssg",
|
|
2
|
+
export declare function getVitePlugins(target: "vasille-web/dev" | "vasille-web" | "vasille-web/ssg", options: {
|
|
3
|
+
errorsHandler?: CompilationErrorReporter;
|
|
4
|
+
v4Naming: boolean;
|
|
5
|
+
}): import("vite").Plugin<any>[];
|
|
@@ -2,7 +2,7 @@ import pluginJsxSyntax from "@babel/plugin-syntax-jsx";
|
|
|
2
2
|
import pluginVasille from "../../babel-plugin/index.js";
|
|
3
3
|
import pluginTypescript from "@babel/plugin-transform-typescript";
|
|
4
4
|
import babel from "vite-plugin-babel";
|
|
5
|
-
export function getVitePlugins(target,
|
|
5
|
+
export function getVitePlugins(target, options) {
|
|
6
6
|
return [
|
|
7
7
|
babel({
|
|
8
8
|
loader: "js",
|
|
@@ -15,7 +15,12 @@ export function getVitePlugins(target, errorsHandler) {
|
|
|
15
15
|
pluginJsxSyntax,
|
|
16
16
|
[
|
|
17
17
|
pluginVasille,
|
|
18
|
-
{
|
|
18
|
+
{
|
|
19
|
+
replaceWeb: target,
|
|
20
|
+
devLayer: target === "vasille-web/dev",
|
|
21
|
+
reporter: options.errorsHandler,
|
|
22
|
+
v4Naming: options.v4Naming,
|
|
23
|
+
},
|
|
19
24
|
],
|
|
20
25
|
[pluginTypescript, { isTSX: true }],
|
|
21
26
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steel-frame",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"description": "SteelFrame: Build Fault-Tolerant Web Applications Effortlessly.",
|
|
5
5
|
"main": "build/cli/run.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@inquirer/select": "^5.2.6",
|
|
61
61
|
"csstype": "^3.1.3",
|
|
62
62
|
"esbuild": "^0.28.2",
|
|
63
|
-
"vasille-web": "7.0
|
|
63
|
+
"vasille-web": "7.1.0",
|
|
64
64
|
"vite": "^8.3.4",
|
|
65
65
|
"vite-plugin-babel": "^1.7.3",
|
|
66
66
|
"vite-plugin-inspect": "^12.1.0",
|