Skip to content

Commit 3d305f1

Browse files
committed
0.9.3
1 parent e4710f5 commit 3d305f1

File tree

7 files changed

+28
-16
lines changed

7 files changed

+28
-16
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aleph-compiler"
3-
version = "0.9.2"
3+
version = "0.9.3"
44
description = "The compiler of Aleph.js written in Rust."
55
repository = "https://github.com/alephjs/aleph.js"
66
authors = ["The Aleph.js authors"]

build.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { dim } from "https://deno.land/std@0.175.0/fmt/colors.ts";
2-
import { ensureDir } from "https://deno.land/std@0.175.0/fs/ensure_dir.ts";
3-
import { encode } from "https://deno.land/std@0.175.0/encoding/base64.ts";
4-
import { dirname } from "https://deno.land/std@0.175.0/path/mod.ts";
1+
import { dim } from "https://deno.land/std@0.180.0/fmt/colors.ts";
2+
import { ensureDir } from "https://deno.land/std@0.180.0/fs/ensure_dir.ts";
3+
import { encode } from "https://deno.land/std@0.180.0/encoding/base64.ts";
4+
import { dirname } from "https://deno.land/std@0.180.0/path/mod.ts";
55

66
async function run(cmd: string[]) {
77
const p = Deno.run({

dist/wasm.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mod.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ensureDir } from "https://deno.land/std@0.175.0/fs/ensure_dir.ts";
2-
import { join } from "https://deno.land/std@0.175.0/path/mod.ts";
1+
import { ensureDir } from "https://deno.land/std@0.180.0/fs/ensure_dir.ts";
2+
import { join } from "https://deno.land/std@0.180.0/path/mod.ts";
33
import init, {
44
parcelCSS,
55
parseDeps as parseDepsWasmFn,

test.ts

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
assertEquals,
33
assertStringIncludes,
4-
} from "https://deno.land/std@0.175.0/testing/asserts.ts";
4+
} from "https://deno.land/std@0.180.0/testing/asserts.ts";
55
import { transform, transformCSS } from "./mod.ts";
66

77
Deno.test("aleph compiler", async (t) => {
@@ -42,7 +42,6 @@ Deno.test("aleph compiler", async (t) => {
4242
},
4343
},
4444
);
45-
4645
assertEquals(
4746
ret.code,
4847
`.foo{background:#ff0;border-radius:2px;transition:background .2s}.foo.bar{color:green}@media ((color) or (hover)) and (min-width:1024px){.a{color:green}}`,
@@ -54,7 +53,6 @@ Deno.test("aleph compiler", async (t) => {
5453
"./mod.ts",
5554
await Deno.readTextFile("./mod.ts"),
5655
);
57-
5856
assertStringIncludes(ret.code, `function transform(`);
5957
});
6058

@@ -69,11 +67,25 @@ Deno.test("aleph compiler", async (t) => {
6967
}
7068
`,
7169
);
72-
7370
assertStringIncludes(ret.code, `React.createElement("h1"`);
7471
});
7572

76-
await t.step("transform jsx (jsxImportSource)", async () => {
73+
await t.step("transform jsx (preserve)", async () => {
74+
const ret = await transform(
75+
"./app.jsx",
76+
`
77+
export default function App() {
78+
return <h1>Hello world!</h1>
79+
}
80+
`,
81+
{
82+
jsx: "preserve",
83+
},
84+
);
85+
assertStringIncludes(ret.code, `<h1>Hello world!</h1>`);
86+
});
87+
88+
await t.step("transform jsx (automatic)", async () => {
7789
const ret = await transform(
7890
"./app.jsx",
7991
`
@@ -82,6 +94,7 @@ Deno.test("aleph compiler", async (t) => {
8294
}
8395
`,
8496
{
97+
jsx: "automatic",
8598
jsxImportSource: "https://esm.sh/react",
8699
resolveRemoteModule: true,
87100
},
@@ -99,7 +112,6 @@ Deno.test("aleph compiler", async (t) => {
99112
await Deno.readTextFile("./testdata/gsi-client.js"),
100113
{ minify: { compress: true } },
101114
);
102-
103115
assertStringIncludes(ret.code, `this.default_gsi`);
104116
});
105117
});

version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** `VERSION` managed by https://deno.land/x/publish */
2-
export const VERSION = "0.9.2";
2+
export const VERSION = "0.9.3";
33

44
/** `prepublish` will be invoked before publish */
55
export async function prepublish(version: string): Promise<boolean> {

0 commit comments

Comments
 (0)