sprockets 3.0.3 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +101 -0
- data/{LICENSE → MIT-LICENSE} +2 -2
- data/README.md +531 -276
- data/bin/sprockets +12 -7
- data/lib/rake/sprocketstask.rb +9 -4
- data/lib/sprockets/add_source_map_comment_to_asset_processor.rb +60 -0
- data/lib/sprockets/asset.rb +41 -28
- data/lib/sprockets/autoload/babel.rb +8 -0
- data/lib/sprockets/autoload/closure.rb +1 -0
- data/lib/sprockets/autoload/coffee_script.rb +1 -0
- data/lib/sprockets/autoload/eco.rb +1 -0
- data/lib/sprockets/autoload/ejs.rb +1 -0
- data/lib/sprockets/autoload/jsminc.rb +8 -0
- data/lib/sprockets/autoload/sass.rb +1 -0
- data/lib/sprockets/autoload/sassc.rb +8 -0
- data/lib/sprockets/autoload/uglifier.rb +1 -0
- data/lib/sprockets/autoload/yui.rb +1 -0
- data/lib/sprockets/autoload/zopfli.rb +7 -0
- data/lib/sprockets/autoload.rb +5 -0
- data/lib/sprockets/babel_processor.rb +66 -0
- data/lib/sprockets/base.rb +61 -13
- data/lib/sprockets/bower.rb +6 -3
- data/lib/sprockets/bundle.rb +41 -5
- data/lib/sprockets/cache/file_store.rb +32 -7
- data/lib/sprockets/cache/memory_store.rb +28 -10
- data/lib/sprockets/cache/null_store.rb +8 -0
- data/lib/sprockets/cache.rb +43 -6
- data/lib/sprockets/cached_environment.rb +15 -20
- data/lib/sprockets/closure_compressor.rb +6 -11
- data/lib/sprockets/coffee_script_processor.rb +20 -6
- data/lib/sprockets/compressing.rb +62 -2
- data/lib/sprockets/configuration.rb +5 -9
- data/lib/sprockets/context.rb +99 -25
- data/lib/sprockets/dependencies.rb +10 -9
- data/lib/sprockets/digest_utils.rb +103 -62
- data/lib/sprockets/directive_processor.rb +64 -36
- data/lib/sprockets/eco_processor.rb +4 -3
- data/lib/sprockets/ejs_processor.rb +4 -3
- data/lib/sprockets/encoding_utils.rb +1 -0
- data/lib/sprockets/environment.rb +9 -4
- data/lib/sprockets/erb_processor.rb +34 -21
- data/lib/sprockets/errors.rb +1 -0
- data/lib/sprockets/exporters/base.rb +71 -0
- data/lib/sprockets/exporters/file_exporter.rb +24 -0
- data/lib/sprockets/exporters/zlib_exporter.rb +33 -0
- data/lib/sprockets/exporters/zopfli_exporter.rb +14 -0
- data/lib/sprockets/exporting.rb +73 -0
- data/lib/sprockets/file_reader.rb +1 -0
- data/lib/sprockets/http_utils.rb +25 -7
- data/lib/sprockets/jsminc_compressor.rb +32 -0
- data/lib/sprockets/jst_processor.rb +11 -10
- data/lib/sprockets/loader.rb +244 -62
- data/lib/sprockets/manifest.rb +100 -46
- data/lib/sprockets/manifest_utils.rb +9 -6
- data/lib/sprockets/mime.rb +8 -42
- data/lib/sprockets/npm.rb +52 -0
- data/lib/sprockets/path_dependency_utils.rb +3 -11
- data/lib/sprockets/path_digest_utils.rb +2 -1
- data/lib/sprockets/path_utils.rb +107 -22
- data/lib/sprockets/paths.rb +1 -0
- data/lib/sprockets/preprocessors/default_source_map.rb +49 -0
- data/lib/sprockets/processing.rb +32 -52
- data/lib/sprockets/processor_utils.rb +38 -39
- data/lib/sprockets/resolve.rb +177 -97
- data/lib/sprockets/sass_cache_store.rb +1 -0
- data/lib/sprockets/sass_compressor.rb +21 -17
- data/lib/sprockets/sass_functions.rb +1 -0
- data/lib/sprockets/sass_importer.rb +1 -0
- data/lib/sprockets/sass_processor.rb +46 -18
- data/lib/sprockets/sassc_compressor.rb +56 -0
- data/lib/sprockets/sassc_processor.rb +297 -0
- data/lib/sprockets/server.rb +77 -44
- data/lib/sprockets/source_map_processor.rb +66 -0
- data/lib/sprockets/source_map_utils.rb +483 -0
- data/lib/sprockets/transformers.rb +63 -35
- data/lib/sprockets/uglifier_compressor.rb +23 -20
- data/lib/sprockets/unloaded_asset.rb +139 -0
- data/lib/sprockets/uri_tar.rb +99 -0
- data/lib/sprockets/uri_utils.rb +14 -14
- data/lib/sprockets/utils/gzip.rb +99 -0
- data/lib/sprockets/utils.rb +63 -71
- data/lib/sprockets/version.rb +2 -1
- data/lib/sprockets/yui_compressor.rb +5 -14
- data/lib/sprockets.rb +105 -33
- metadata +157 -27
- data/lib/sprockets/coffee_script_template.rb +0 -6
- data/lib/sprockets/eco_template.rb +0 -6
- data/lib/sprockets/ejs_template.rb +0 -6
- data/lib/sprockets/engines.rb +0 -81
- data/lib/sprockets/erb_template.rb +0 -6
- data/lib/sprockets/legacy.rb +0 -314
- data/lib/sprockets/legacy_proc_processor.rb +0 -35
- data/lib/sprockets/legacy_tilt_processor.rb +0 -29
- data/lib/sprockets/sass_template.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3c5995147a647a6d47d625b6cc9f10586506f3832cff0070985ec9560ee3fc0d
|
4
|
+
data.tar.gz: 1befd6f705efbef88f05dc58b38f719f11b445f76c60a95f854a43ef8e84c21d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d47aea08307515c8a0fab29615fbde5f892c91300668afd83b2739032adeb77794d4303e6ecb56c570bc784695d25304f7481fa45c4ab7bbe0727281ee7deab
|
7
|
+
data.tar.gz: 6d0f0b116766053d96402f5d88602374829ef9610160bd8398a093db33ceaafe31a2f2b33a8d0c615769f0bbba7c39d867db90dfded9bc5ff35d0c0ff4482e36
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
**Master**
|
2
|
+
|
3
|
+
Get upgrade notes from Sprockets 3.x to 4.x at https://github.com/rails/sprockets/blob/master/UPGRADING.md
|
4
|
+
|
5
|
+
## 4.2.0
|
6
|
+
|
7
|
+
- Rack 3 compatibility. [#758](https://github.com/rails/sprockets/pull/758)
|
8
|
+
- Fix thread safety of `Sprockets::CachedEnvironment` and `Sprockets::Cache::MemoryStore`. [#771](https://github.com/rails/sprockets/pull/771)
|
9
|
+
- Add support for Rack 3.0. Headers set by sprockets will now be lower case. [#758](https://github.com/rails/sprockets/pull/758)
|
10
|
+
- Make `Sprockets::Utils.module_include` thread safe on JRuby. [#759](https://github.com/rails/sprockets/pull/759)
|
11
|
+
|
12
|
+
## 4.1.0
|
13
|
+
|
14
|
+
- Allow age to be altered in asset:clean rake task.
|
15
|
+
- Fix `Sprockets::Server` to return lower-cased response headers to comply with Rack::Lint 3.0. [#744](https://github.com/rails/sprockets/pull/744)
|
16
|
+
- Adding new directive `depend_on_directory` [#668](https://github.com/rails/sprockets/pull/668)
|
17
|
+
- Fix `application/js-sourcemap+json` charset [#669](https://github.com/rails/sprockets/pull/669)
|
18
|
+
- Fix `CachedEnvironment` caching nil values [#723](https://github.com/rails/sprockets/pull/723)
|
19
|
+
- Process `*.jst.ejs.erb` files with ERBProcessor [#674](https://github.com/rails/sprockets/pull/674)
|
20
|
+
- Fix cache key for coffee script processor to be dependent on the filename [#670](https://github.com/rails/sprockets/pull/670)
|
21
|
+
|
22
|
+
## 4.0.3
|
23
|
+
|
24
|
+
- Fix `Manifest#find` yielding from a Promise causing issue on Ruby 3.1.0-dev. [#720](https://github.com/rails/sprockets/pull/720)
|
25
|
+
- Better detect the ERB version to avoid deprecation warnings. [#719](https://github.com/rails/sprockets/pull/719)
|
26
|
+
- Allow assets already fingerprinted to be served through `Sprockets::Server`
|
27
|
+
- Do not fingerprint files that already contain a valid digest in their name
|
28
|
+
- Remove remaining support for Ruby < 2.4.[#672](https://github.com/rails/sprockets/pull/672)
|
29
|
+
|
30
|
+
## 4.0.2
|
31
|
+
|
32
|
+
- Fix `etag` and digest path compilation that were generating string with invalid digest since 4.0.1.
|
33
|
+
|
34
|
+
## 4.0.1
|
35
|
+
|
36
|
+
- Fix for Ruby 2.7 keyword arguments warning in `base.rb`. [#660](https://github.com/rails/sprockets/pull/660)
|
37
|
+
- Fix for when `x_sprockets_linecount` is missing from a source map.
|
38
|
+
- Fix subresource integrity to match the digest of the asset.
|
39
|
+
|
40
|
+
## 4.0.0
|
41
|
+
|
42
|
+
- Fixes for Ruby 2.7 keyword arguments warnings [#625](https://github.com/rails/sprockets/pull/625)
|
43
|
+
- Manifest files are sorted alphabetically [#626](https://github.com/rails/sprockets/pull/626)
|
44
|
+
|
45
|
+
## 4.0.0.beta10
|
46
|
+
|
47
|
+
- Fix YACB (Yet Another Caching Bug) [Fix broken expansion of asset link paths](https://github.com/rails/sprockets/pull/614)
|
48
|
+
|
49
|
+
## 4.0.0.beta9
|
50
|
+
|
51
|
+
- Minimum Ruby version for Sprockets 4 is now 2.5+ which matches minimum ruby version of Rails [#604]
|
52
|
+
- Fix threading bug introduced in Sprockets 4 [#603]
|
53
|
+
- Warn when two potential manifest files exist. [#560]
|
54
|
+
|
55
|
+
## 4.0.0.beta8
|
56
|
+
|
57
|
+
- Security release for [CVE-2018-3760](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3760)
|
58
|
+
|
59
|
+
## 4.0.0.beta7
|
60
|
+
|
61
|
+
- Fix a year long bug that caused `Sprockets::FileNotFound` errors when the asset was present [#547]
|
62
|
+
- Raise an error when two assets such as foo.js and foo.js.erb would produce the same output artifact (foo.js) [#549 #530]
|
63
|
+
- Process `*.jst.eco.erb` files with ERBProcessor
|
64
|
+
|
65
|
+
## 4.0.0.beta6
|
66
|
+
|
67
|
+
- Fix source map line offsets [#515]
|
68
|
+
- Return a `400 Bad Request` when the path encoding is invalid. [#514]
|
69
|
+
|
70
|
+
## 4.0.0.beta5
|
71
|
+
|
72
|
+
- Reduce string allocations
|
73
|
+
- Source map metadata uses compressed form specified by the [source map v3 spec](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k). [#402] **[BREAKING]**
|
74
|
+
- Generate [index maps](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt) when decoding source maps isn't necessary. [#402]
|
75
|
+
- Remove fingerprints from source map files. [#402]
|
76
|
+
|
77
|
+
## 4.0.0.beta4
|
78
|
+
|
79
|
+
- Changing the version now busts the digest of all assets [#404]
|
80
|
+
- Exporter interface added [#386]
|
81
|
+
- Using ENV vars in templates will recompile templates when the env vars change. [#365]
|
82
|
+
- Source maps for imported sass files with sassc is now fixed [#391]
|
83
|
+
- Load paths now in error messages [#322]
|
84
|
+
- Cache key added to babel processor [#387]
|
85
|
+
- `Environment#find_asset!` can now be used to raise an exception when asset could not be found [#379]
|
86
|
+
|
87
|
+
## 4.0.0.beta3
|
88
|
+
|
89
|
+
- Source Map fixes [#255] [#367]
|
90
|
+
- Performance improvements
|
91
|
+
|
92
|
+
## 4.0.0.beta2
|
93
|
+
|
94
|
+
- Fix load_paths on Sass processors [#223]
|
95
|
+
|
96
|
+
|
97
|
+
## 4.0.0.beta1
|
98
|
+
|
99
|
+
- Initial release of Sprockets 4
|
100
|
+
|
101
|
+
Please upgrade to the latest Sprockets 3 version before upgrading to Sprockets 4. Check the 3.x branch for previous changes https://github.com/rails/sprockets/blob/3.x/CHANGELOG.md.
|
data/{LICENSE → MIT-LICENSE}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
|
-
Copyright (c) 2014 Sam Stephenson
|
2
|
-
Copyright (c) 2014 Joshua Peek
|
1
|
+
Copyright (c) 2014-2019 Sam Stephenson
|
2
|
+
Copyright (c) 2014-2019 Joshua Peek
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining
|
5
5
|
a copy of this software and associated documentation files (the
|