lightningcss 0.2.0 → 1.33.0
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.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/lightningcss/version.rb +1 -1
- data/rust/Cargo.lock +31 -30
- data/rust/Cargo.toml +2 -3
- data/rust/build.rs +22 -0
- data/rust/src/lib.rs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '09297541239f07c2b22b3f699d90d366ad9479f28ad17a80fc3fba33c7b05b45'
|
|
4
|
+
data.tar.gz: 7ed51af76692654c75dc7b5692380e4954413e76e6fcc404f0fc339bcec64216
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 340e848e41f76321291393c84dde862a56511c24d07a4f495d2ca89dd5f84bd8d71a9ae4f4957f8503fa4c2055db835eea511ae4810df2a7193e2516dfe38502
|
|
7
|
+
data.tar.gz: be421633d75dd27dd469aa1fa837b94c0abc0d2e48ad90641b9129b5a95ec88c3f0045dad93f4be2b0e4080d3884ad7e495d4f6b2441396c50eeb434b11b6d82
|
data/README.md
CHANGED
|
@@ -27,6 +27,16 @@ bundle add lightningcss
|
|
|
27
27
|
|
|
28
28
|
Precompiled gems are published for Linux (gnu and musl) and macOS, on x86_64, aarch64, and arm. On those platforms nothing is compiled at install time. Anywhere else the gem builds from source and needs the [Rust toolchain](https://rustup.rs).
|
|
29
29
|
|
|
30
|
+
### Versioning
|
|
31
|
+
|
|
32
|
+
The gem carries the version of the Lightning CSS release it packages. Gem v1.33.0 bundles [Lightning CSS v1.33.0](https://github.com/parcel-bundler/lightningcss/releases/tag/v1.33.0).
|
|
33
|
+
|
|
34
|
+
Lightning CSS publishes its Rust crate under a different number than it releases under: v1.33.0 ships the crate as `1.0.0-alpha.72`. The gem follows the release, since that is the version everything else calls it. `LightningCSS.lightningcss_version` reports the crate version a given build was compiled against.
|
|
35
|
+
|
|
36
|
+
So the version tracks Lightning CSS, not the Ruby API here. A minor bump is a minor Lightning CSS release, and says nothing about whether this gem's own API moved. Pin on the Lightning CSS version you want.
|
|
37
|
+
|
|
38
|
+
If the gem needs releasing again for the same Lightning CSS version, that release adds a fourth digit, as in v1.33.0.1.
|
|
39
|
+
|
|
30
40
|
### Usage
|
|
31
41
|
|
|
32
42
|
#### Transforming
|
data/lib/lightningcss/version.rb
CHANGED
data/rust/Cargo.lock
CHANGED
|
@@ -139,9 +139,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
|
139
139
|
|
|
140
140
|
[[package]]
|
|
141
141
|
name = "cbindgen"
|
|
142
|
-
version = "0.
|
|
142
|
+
version = "0.29.4"
|
|
143
143
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
144
|
-
checksum = "
|
|
144
|
+
checksum = "2ecb53484c9c167ba674026b656d8a27d7657a58e6066aa902bfb1a4aa00ae20"
|
|
145
145
|
dependencies = [
|
|
146
146
|
"clap",
|
|
147
147
|
"heck",
|
|
@@ -425,9 +425,9 @@ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
|
|
|
425
425
|
|
|
426
426
|
[[package]]
|
|
427
427
|
name = "heck"
|
|
428
|
-
version = "0.
|
|
428
|
+
version = "0.5.0"
|
|
429
429
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
430
|
-
checksum = "
|
|
430
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
431
431
|
|
|
432
432
|
[[package]]
|
|
433
433
|
name = "indexmap"
|
|
@@ -527,7 +527,7 @@ dependencies = [
|
|
|
527
527
|
|
|
528
528
|
[[package]]
|
|
529
529
|
name = "lightningcss-ffi"
|
|
530
|
-
version = "0.
|
|
530
|
+
version = "0.0.0"
|
|
531
531
|
dependencies = [
|
|
532
532
|
"cbindgen",
|
|
533
533
|
"lightningcss",
|
|
@@ -963,11 +963,11 @@ dependencies = [
|
|
|
963
963
|
|
|
964
964
|
[[package]]
|
|
965
965
|
name = "serde_spanned"
|
|
966
|
-
version = "
|
|
966
|
+
version = "1.1.1"
|
|
967
967
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
968
|
-
checksum = "
|
|
968
|
+
checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"
|
|
969
969
|
dependencies = [
|
|
970
|
-
"
|
|
970
|
+
"serde_core",
|
|
971
971
|
]
|
|
972
972
|
|
|
973
973
|
[[package]]
|
|
@@ -1078,44 +1078,42 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|
|
1078
1078
|
|
|
1079
1079
|
[[package]]
|
|
1080
1080
|
name = "toml"
|
|
1081
|
-
version = "0.
|
|
1081
|
+
version = "0.9.12+spec-1.1.0"
|
|
1082
1082
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1083
|
-
checksum = "
|
|
1083
|
+
checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
|
|
1084
1084
|
dependencies = [
|
|
1085
|
-
"
|
|
1085
|
+
"indexmap",
|
|
1086
|
+
"serde_core",
|
|
1086
1087
|
"serde_spanned",
|
|
1087
1088
|
"toml_datetime",
|
|
1088
|
-
"
|
|
1089
|
+
"toml_parser",
|
|
1090
|
+
"toml_writer",
|
|
1091
|
+
"winnow 0.7.15",
|
|
1089
1092
|
]
|
|
1090
1093
|
|
|
1091
1094
|
[[package]]
|
|
1092
1095
|
name = "toml_datetime"
|
|
1093
|
-
version = "0.
|
|
1096
|
+
version = "0.7.5+spec-1.1.0"
|
|
1094
1097
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1095
|
-
checksum = "
|
|
1098
|
+
checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
|
|
1096
1099
|
dependencies = [
|
|
1097
|
-
"
|
|
1100
|
+
"serde_core",
|
|
1098
1101
|
]
|
|
1099
1102
|
|
|
1100
1103
|
[[package]]
|
|
1101
|
-
name = "
|
|
1102
|
-
version = "
|
|
1104
|
+
name = "toml_parser"
|
|
1105
|
+
version = "1.1.3+spec-1.1.0"
|
|
1103
1106
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1104
|
-
checksum = "
|
|
1107
|
+
checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56"
|
|
1105
1108
|
dependencies = [
|
|
1106
|
-
"
|
|
1107
|
-
"serde",
|
|
1108
|
-
"serde_spanned",
|
|
1109
|
-
"toml_datetime",
|
|
1110
|
-
"toml_write",
|
|
1111
|
-
"winnow",
|
|
1109
|
+
"winnow 1.0.4",
|
|
1112
1110
|
]
|
|
1113
1111
|
|
|
1114
1112
|
[[package]]
|
|
1115
|
-
name = "
|
|
1116
|
-
version = "
|
|
1113
|
+
name = "toml_writer"
|
|
1114
|
+
version = "1.1.2+spec-1.1.0"
|
|
1117
1115
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1118
|
-
checksum = "
|
|
1116
|
+
checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
|
|
1119
1117
|
|
|
1120
1118
|
[[package]]
|
|
1121
1119
|
name = "unicode-ident"
|
|
@@ -1237,9 +1235,12 @@ name = "winnow"
|
|
|
1237
1235
|
version = "0.7.15"
|
|
1238
1236
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1239
1237
|
checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1238
|
+
|
|
1239
|
+
[[package]]
|
|
1240
|
+
name = "winnow"
|
|
1241
|
+
version = "1.0.4"
|
|
1242
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1243
|
+
checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"
|
|
1243
1244
|
|
|
1244
1245
|
[[package]]
|
|
1245
1246
|
name = "wit-bindgen"
|
data/rust/Cargo.toml
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[package]
|
|
4
4
|
name = "lightningcss-ffi"
|
|
5
|
-
version = "0.2.0"
|
|
6
5
|
edition = "2021"
|
|
7
6
|
authors = ["Marco Roth <marco.roth@intergga.ch>"]
|
|
8
7
|
description = "C FFI bindings for Lightning CSS, used by the lightningcss gem"
|
|
@@ -16,9 +15,9 @@ path = "src/lib.rs"
|
|
|
16
15
|
crate-type = ["cdylib", "staticlib", "rlib"]
|
|
17
16
|
|
|
18
17
|
[dependencies]
|
|
19
|
-
lightningcss = { version = "1.0.0-alpha.
|
|
18
|
+
lightningcss = { version = "=1.0.0-alpha.72", features = ["visitor"] }
|
|
20
19
|
serde = { version = "1", features = ["derive"] }
|
|
21
20
|
serde_json = "1"
|
|
22
21
|
|
|
23
22
|
[build-dependencies]
|
|
24
|
-
cbindgen = "0.
|
|
23
|
+
cbindgen = "0.29"
|
data/rust/build.rs
CHANGED
|
@@ -28,10 +28,32 @@ fn main() {
|
|
|
28
28
|
PathBuf::from(&crate_dir).join("cbindgen.toml").display()
|
|
29
29
|
);
|
|
30
30
|
|
|
31
|
+
let version_rb_path = PathBuf::from(&crate_dir).join("../lib/lightningcss/version.rb");
|
|
32
|
+
|
|
33
|
+
println!("cargo:rerun-if-changed={}", version_rb_path.display());
|
|
34
|
+
|
|
31
35
|
println!(
|
|
32
36
|
"cargo:rustc-env=LIGHTNINGCSS_VERSION={}",
|
|
33
37
|
locked_version(&lock_path, "lightningcss")
|
|
34
38
|
);
|
|
39
|
+
|
|
40
|
+
println!("cargo:rustc-env=GEM_VERSION={}", gem_version(&version_rb_path));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
fn gem_version(version_rb_path: &PathBuf) -> String {
|
|
44
|
+
let Ok(source) = fs::read_to_string(version_rb_path) else {
|
|
45
|
+
return "unknown".to_string();
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
for line in source.lines() {
|
|
49
|
+
let Some(rest) = line.trim().strip_prefix("VERSION = ") else {
|
|
50
|
+
continue;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return rest.trim().trim_matches('"').to_string();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
"unknown".to_string()
|
|
35
57
|
}
|
|
36
58
|
|
|
37
59
|
fn locked_version(lock_path: &PathBuf, package: &str) -> String {
|
data/rust/src/lib.rs
CHANGED
|
@@ -24,7 +24,7 @@ use lightningcss::visitor::Visit;
|
|
|
24
24
|
use crate::options::{TransformOptions, TransformResult};
|
|
25
25
|
use crate::scope::Scoper;
|
|
26
26
|
|
|
27
|
-
pub const VERSION: &str = env!("
|
|
27
|
+
pub const VERSION: &str = env!("GEM_VERSION");
|
|
28
28
|
pub const LIGHTNINGCSS_VERSION: &str = env!("LIGHTNINGCSS_VERSION");
|
|
29
29
|
|
|
30
30
|
#[repr(C)]
|