proscenium 0.27.0 → 0.28.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6c3336fed2360c25edcfadcab2870d3602ee123fa9a9f46af3f1d47a161ab33
4
- data.tar.gz: e8d054e442438a978a6f05641bcd9123385d92836eb75c4bc4671e921149b974
3
+ metadata.gz: 8cfc5cc73771a4dbac2cdd7adeb5fe667f593820e2bf60beb462a0e3730a1fec
4
+ data.tar.gz: c86c6de4c4f656adc81b518bf28633535724c62d46acfc82967736eca8494a91
5
5
  SHA512:
6
- metadata.gz: '008b25e579252bcffa87b91afc8ea1d2f452b8d1c76630ed122e2c19eb37a794257068b9e739d6eca5d615e564a8dadeb3ca8d0f2a238efcee9b3d45597f63f2'
7
- data.tar.gz: d1d951aba8666396e4dfdd103828ab7e9a1cfe27d2100798f1427a5fd5132111241a09f36b8a342d707781098d171c9035338414c3077d7bbab781428ded69fb
6
+ metadata.gz: ead35dde4022afd3a283e333fb8a667f3ce07a71a9c1e96387b0671af73d1f59761590db95aa55296801b7e0040b2e25c5db84f49e39aa531ab3d76d45fc2f51
7
+ data.tar.gz: 268c4a504bfcbdc55e38d1451e64d0759c2a369b179174bcaa581ee0d55a0529b8459d57d9a99145aa23b5eb60e8cc45814e39d15802ea459692cc96b82ff5d8
data/README.md CHANGED
@@ -80,7 +80,7 @@ gem 'proscenium'
80
80
  ```
81
81
 
82
82
  Please note that Proscenium is designed solely for use with Rails. It needs Ruby 3.4 or newer, and
83
- Rails 7.2 to 8.x.
83
+ Rails 8.0 to 8.x.
84
84
 
85
85
  Now if you start your Rails app, you can open any front end code (JS, CSS, etc.). For example, a file at `app/assets/stylesheets/application.css` can be accessed at `https://localhost:3000/app/assets/stylesheets/application.css`, which will be transformed, bundled, and minified [in production] in real time.
86
86
 
@@ -1014,6 +1014,8 @@ This matters if you run Puma in cluster mode with `preload_app!` (the app, inclu
1014
1014
 
1015
1015
  **Do not call any `Proscenium::Builder` method (directly, or indirectly via the resolver/side-loading) from a Rails initializer or any other code that runs during application boot**, if you use `preload_app!` with `workers`. Doing so initializes the Go runtime in the master process before the fork, and every worker will inherit a broken one. There is no fix available from Go's side - this is a fundamental fork() limitation, not a bug Proscenium can work around. Asset builds and resolves triggered by actual HTTP requests (the normal case) are unaffected, since those always happen after the fork, independently in each worker.
1016
1016
 
1017
+ Each worker that has called the builder starts up to about `GOMAXPROCS` threads for it. Proscenium ends the idle ones 30 seconds after the worker's last builder call, so they count against a container's task limit only while it is building.
1018
+
1017
1019
  ## Thanks
1018
1020
 
1019
1021
  HUGE thanks 🙏 go to [Evan Wallace](https://github.com/evanw) and his amazing [esbuild](https://esbuild.github.io/) project. Proscenium would not be possible without it, and it is esbuild that makes this so fast and efficient.
@@ -1039,7 +1041,8 @@ bin/test
1039
1041
  To run the Go tests:
1040
1042
 
1041
1043
  ```bash
1042
- go test ./test ./internal/...
1044
+ go test ./test -ginkgo.silence-skips
1045
+ go test ./internal/...
1043
1046
  ```
1044
1047
 
1045
1048
  To run the JavaScript tests, which need the Go library compiled first:
@@ -38,9 +38,14 @@ module Proscenium
38
38
  # Whether an ignore rule could match a path the contexts are committed under. Generous: `*`
39
39
  # crosses `/` here, so at worst the lines are added once more than needed.
40
40
  def hides_contexts?(line)
41
- pattern = line.strip.delete_prefix('/').chomp('/')
41
+ rule = line.strip.chomp('/')
42
+ pattern = rule.delete_prefix('/')
42
43
  return false if pattern.empty? || pattern.start_with?('#', '!')
43
44
 
45
+ # Git anchors a rule with a slash at its start or in its middle to the root, so only one
46
+ # without (`**/` aside) can match a directory's name at any depth.
47
+ anywhere = !rule.delete_prefix('**/').include?('/')
48
+
44
49
  # Git's `**/` also matches no directory at all. Ruby's does too with FNM_PATHNAME, inside a
45
50
  # pattern, but not at its start, so that prefix is also dropped; without FNM_PATHNAME, a
46
51
  # trailing `**` (and `*`) crosses `/` as Git's trailing `/**` does.
@@ -55,7 +60,7 @@ module Proscenium
55
60
  [pattern, wide].flat_map { [it, it.delete_prefix('**/')] }.uniq.any? do |glob|
56
61
  paths.any? do |path|
57
62
  FLAGS.any? { File.fnmatch?(glob, path, it) } ||
58
- File.fnmatch?(glob, File.basename(path), File::FNM_DOTMATCH)
63
+ (anywhere && File.fnmatch?(glob, File.basename(path), File::FNM_DOTMATCH))
59
64
  end
60
65
  end
61
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.27.0'
4
+ VERSION = '0.28.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Moss
@@ -29,7 +29,7 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 7.2.0
32
+ version: 8.0.0
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
35
  version: '9.0'
@@ -39,7 +39,7 @@ dependencies:
39
39
  requirements:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 7.2.0
42
+ version: 8.0.0
43
43
  - - "<"
44
44
  - !ruby/object:Gem::Version
45
45
  version: '9.0'