lightningcss 0.1.0-arm-linux-gnu → 0.1.1-arm-linux-gnu

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95581029fe4fcf93d6e52ff061cf3a8ad915750e4a02917efd0ce69092878f24
4
- data.tar.gz: '058e90f52c6f59765286e76e213ad34477ed61f30653cab381b73c39088c5937'
3
+ metadata.gz: 17f42e6eaaea63804cfab2ca215c526f318d34b354cc1879308a6c7c507904ff
4
+ data.tar.gz: '03866e4a0fb88ef0ff7974e09ef1a738d2d48999923d7f32da37f1348295a3f0'
5
5
  SHA512:
6
- metadata.gz: a44936462f04f94c6a97b9a0c033d7a31c867b17cfdbb8e9785f1e635202099f4cabe428f85875f743fe36ab4e12645c4a3847660c90f5a2477b023840a76876
7
- data.tar.gz: 75c61b344392a6d960b4d897108a44df584ff9fbe203f1020c23acea8e66baf5d5eb522d9f6610b0a4fdfb174287383889a91ff1ea4b5a20903a03f00fe9089b
6
+ metadata.gz: 9b06216474edc9dba81a8363a5ff16d4792f28236d8183ed544fe7653c5b15284ba1712197d58b462c4eae724c822e4c795c5d2ec9716e6826af15d198e053f4
7
+ data.tar.gz: 3cfffbf47c2ddfad5aba582945f75c21b69d73066d0829203b5a29a11ae57f38a7353148c51e3378381ab00b61ab467a7ae1c22c65489aaf03bd8e79124af8d4
@@ -21,6 +21,8 @@ struct LightningCssResult lightningcss_bundle(const char *path, const char *opti
21
21
 
22
22
  char *lightningcss_version(void);
23
23
 
24
+ char *lightningcss_lightningcss_version(void);
25
+
24
26
  void lightningcss_string_free(char *value);
25
27
 
26
28
  void lightningcss_result_free(struct LightningCssResult result);
@@ -85,6 +85,12 @@ static VALUE rb_native_version(VALUE self) {
85
85
  return take_utf8_string(lightningcss_version());
86
86
  }
87
87
 
88
+ static VALUE rb_lightningcss_version(VALUE self) {
89
+ (void) self;
90
+
91
+ return take_utf8_string(lightningcss_lightningcss_version());
92
+ }
93
+
88
94
  void Init_lightningcss(void) {
89
95
  rb_mLightningCSS = rb_define_module("LightningCSS");
90
96
  rb_mBackend = rb_define_module_under(rb_mLightningCSS, "Backend");
@@ -98,4 +104,5 @@ void Init_lightningcss(void) {
98
104
  rb_define_singleton_method(rb_mBackend, "transform_style_attribute", rb_transform_style_attribute, 2);
99
105
  rb_define_singleton_method(rb_mBackend, "bundle", rb_bundle, 2);
100
106
  rb_define_singleton_method(rb_mBackend, "version", rb_native_version, 0);
107
+ rb_define_singleton_method(rb_mBackend, "lightningcss_version", rb_lightningcss_version, 0);
101
108
  }
Binary file
Binary file
Binary file
Binary file
@@ -23,6 +23,11 @@ module LightningCSS
23
23
  unavailable(__method__)
24
24
  end
25
25
 
26
+ #: () -> String
27
+ def lightningcss_version
28
+ unavailable(__method__)
29
+ end
30
+
26
31
  private
27
32
 
28
33
  #: (Symbol?) -> bot
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LightningCSS
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
data/lib/lightningcss.rb CHANGED
@@ -54,7 +54,7 @@ module LightningCSS
54
54
  end
55
55
 
56
56
  #: () -> String
57
- def self.native_version
58
- Backend.version
57
+ def self.lightningcss_version
58
+ Backend.lightningcss_version
59
59
  end
60
60
  end
data/lightningcss.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = "An extremely fast CSS parser, transformer, bundler, and minifier."
12
12
  spec.description = "Ruby bindings for Lightning CSS, an extremely fast CSS parser, transformer, bundler, and minifier."
13
13
  spec.homepage = "https://github.com/marcoroth/lightningcss-ruby"
14
- spec.license = "MIT"
14
+ spec.licenses = ["MIT", "MPL-2.0"]
15
15
  spec.required_ruby_version = ">= 3.2.0"
16
16
  spec.require_paths = ["lib"]
17
17
 
data/rust/Cargo.lock CHANGED
@@ -527,7 +527,7 @@ dependencies = [
527
527
 
528
528
  [[package]]
529
529
  name = "lightningcss-ffi"
530
- version = "0.1.0"
530
+ version = "0.1.1"
531
531
  dependencies = [
532
532
  "cbindgen",
533
533
  "lightningcss",
data/rust/Cargo.toml CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [package]
4
4
  name = "lightningcss-ffi"
5
- version = "0.1.0"
5
+ version = "0.1.1"
6
6
  edition = "2021"
7
7
  authors = ["Marco Roth <marco.roth@intergga.ch>"]
8
8
  description = "C FFI bindings for Lightning CSS, used by the lightningcss gem"
data/rust/build.rs CHANGED
@@ -1,4 +1,5 @@
1
1
  use std::env;
2
+ use std::fs;
2
3
  use std::path::PathBuf;
3
4
 
4
5
  fn main() {
@@ -12,4 +13,33 @@ fn main() {
12
13
 
13
14
  bindings.write_to_file(&header_path);
14
15
  }
16
+
17
+ let lock_path = PathBuf::from(&crate_dir).join("Cargo.lock");
18
+
19
+ println!("cargo:rerun-if-changed={}", lock_path.display());
20
+
21
+ println!(
22
+ "cargo:rustc-env=LIGHTNINGCSS_VERSION={}",
23
+ locked_version(&lock_path, "lightningcss")
24
+ );
25
+ }
26
+
27
+ fn locked_version(lock_path: &PathBuf, package: &str) -> String {
28
+ let Ok(lock) = fs::read_to_string(lock_path) else {
29
+ return "unknown".to_string();
30
+ };
31
+
32
+ let mut lines = lock.lines();
33
+
34
+ while let Some(line) = lines.next() {
35
+ if line.trim() != format!("name = \"{package}\"") {
36
+ continue;
37
+ }
38
+
39
+ if let Some(version) = lines.next().and_then(|next| next.trim().strip_prefix("version = ")) {
40
+ return version.trim_matches('"').to_string();
41
+ }
42
+ }
43
+
44
+ "unknown".to_string()
15
45
  }
data/rust/src/lib.rs CHANGED
@@ -25,6 +25,7 @@ use crate::options::{TransformOptions, TransformResult};
25
25
  use crate::scope::Scoper;
26
26
 
27
27
  pub const VERSION: &str = env!("CARGO_PKG_VERSION");
28
+ pub const LIGHTNINGCSS_VERSION: &str = env!("LIGHTNINGCSS_VERSION");
28
29
 
29
30
  #[repr(C)]
30
31
  pub struct LightningCssResult {
@@ -294,6 +295,11 @@ pub unsafe extern "C" fn lightningcss_version() -> *mut c_char {
294
295
  into_c_string(VERSION)
295
296
  }
296
297
 
298
+ #[no_mangle]
299
+ pub unsafe extern "C" fn lightningcss_lightningcss_version() -> *mut c_char {
300
+ into_c_string(LIGHTNINGCSS_VERSION)
301
+ }
302
+
297
303
  #[no_mangle]
298
304
  pub unsafe extern "C" fn lightningcss_string_free(value: *mut c_char) {
299
305
  if !value.is_null() {
@@ -15,6 +15,9 @@ module LightningCSS
15
15
  # : () -> String
16
16
  def version: () -> String
17
17
 
18
+ # : () -> String
19
+ def lightningcss_version: () -> String
20
+
18
21
  private
19
22
 
20
23
  # : (Symbol?) -> bot
data/sig/lightningcss.rbs CHANGED
@@ -27,5 +27,5 @@ module LightningCSS
27
27
  def self.minify: (String, ?filename: String?, ?error_recovery: bool, ?targets: browsers?, ?css_modules: css_modules?, ?scope: String?) -> String
28
28
 
29
29
  # : () -> String
30
- def self.native_version: () -> String
30
+ def self.lightningcss_version: () -> String
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightningcss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: arm-linux-gnu
6
6
  authors:
7
7
  - Marco Roth
@@ -56,6 +56,7 @@ files:
56
56
  homepage: https://github.com/marcoroth/lightningcss-ruby
57
57
  licenses:
58
58
  - MIT
59
+ - MPL-2.0
59
60
  metadata:
60
61
  homepage_uri: https://github.com/marcoroth/lightningcss-ruby
61
62
  source_code_uri: https://github.com/marcoroth/lightningcss-ruby