sprockets 3.0.0 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +76 -0
  3. data/README.md +426 -404
  4. data/bin/sprockets +12 -7
  5. data/lib/rake/sprocketstask.rb +3 -2
  6. data/lib/sprockets/add_source_map_comment_to_asset_processor.rb +60 -0
  7. data/lib/sprockets/asset.rb +33 -24
  8. data/lib/sprockets/autoload/babel.rb +8 -0
  9. data/lib/sprockets/autoload/closure.rb +1 -0
  10. data/lib/sprockets/autoload/coffee_script.rb +1 -0
  11. data/lib/sprockets/autoload/eco.rb +1 -0
  12. data/lib/sprockets/autoload/ejs.rb +1 -0
  13. data/lib/sprockets/autoload/jsminc.rb +8 -0
  14. data/lib/sprockets/autoload/sass.rb +1 -0
  15. data/lib/sprockets/autoload/sassc.rb +8 -0
  16. data/lib/sprockets/autoload/uglifier.rb +1 -0
  17. data/lib/sprockets/autoload/yui.rb +1 -0
  18. data/lib/sprockets/autoload/zopfli.rb +7 -0
  19. data/lib/sprockets/autoload.rb +5 -0
  20. data/lib/sprockets/babel_processor.rb +66 -0
  21. data/lib/sprockets/base.rb +61 -13
  22. data/lib/sprockets/bower.rb +5 -2
  23. data/lib/sprockets/bundle.rb +44 -4
  24. data/lib/sprockets/cache/file_store.rb +32 -7
  25. data/lib/sprockets/cache/memory_store.rb +9 -0
  26. data/lib/sprockets/cache/null_store.rb +8 -0
  27. data/lib/sprockets/cache.rb +42 -5
  28. data/lib/sprockets/cached_environment.rb +14 -19
  29. data/lib/sprockets/closure_compressor.rb +6 -11
  30. data/lib/sprockets/coffee_script_processor.rb +19 -5
  31. data/lib/sprockets/compressing.rb +62 -2
  32. data/lib/sprockets/configuration.rb +3 -7
  33. data/lib/sprockets/context.rb +98 -23
  34. data/lib/sprockets/dependencies.rb +9 -8
  35. data/lib/sprockets/digest_utils.rb +104 -60
  36. data/lib/sprockets/directive_processor.rb +45 -35
  37. data/lib/sprockets/eco_processor.rb +3 -2
  38. data/lib/sprockets/ejs_processor.rb +3 -2
  39. data/lib/sprockets/encoding_utils.rb +8 -4
  40. data/lib/sprockets/environment.rb +9 -4
  41. data/lib/sprockets/erb_processor.rb +28 -21
  42. data/lib/sprockets/errors.rb +1 -1
  43. data/lib/sprockets/exporters/base.rb +71 -0
  44. data/lib/sprockets/exporters/file_exporter.rb +24 -0
  45. data/lib/sprockets/exporters/zlib_exporter.rb +33 -0
  46. data/lib/sprockets/exporters/zopfli_exporter.rb +14 -0
  47. data/lib/sprockets/exporting.rb +73 -0
  48. data/lib/sprockets/file_reader.rb +1 -0
  49. data/lib/sprockets/http_utils.rb +26 -6
  50. data/lib/sprockets/jsminc_compressor.rb +32 -0
  51. data/lib/sprockets/jst_processor.rb +11 -10
  52. data/lib/sprockets/loader.rb +239 -70
  53. data/lib/sprockets/manifest.rb +97 -44
  54. data/lib/sprockets/manifest_utils.rb +9 -6
  55. data/lib/sprockets/mime.rb +8 -42
  56. data/lib/sprockets/npm.rb +52 -0
  57. data/lib/sprockets/path_dependency_utils.rb +3 -11
  58. data/lib/sprockets/path_digest_utils.rb +2 -1
  59. data/lib/sprockets/path_utils.rb +106 -21
  60. data/lib/sprockets/paths.rb +1 -0
  61. data/lib/sprockets/preprocessors/default_source_map.rb +49 -0
  62. data/lib/sprockets/processing.rb +31 -51
  63. data/lib/sprockets/processor_utils.rb +81 -15
  64. data/lib/sprockets/resolve.rb +182 -95
  65. data/lib/sprockets/sass_cache_store.rb +1 -0
  66. data/lib/sprockets/sass_compressor.rb +21 -17
  67. data/lib/sprockets/sass_functions.rb +1 -0
  68. data/lib/sprockets/sass_importer.rb +1 -0
  69. data/lib/sprockets/sass_processor.rb +45 -17
  70. data/lib/sprockets/sassc_compressor.rb +56 -0
  71. data/lib/sprockets/sassc_processor.rb +297 -0
  72. data/lib/sprockets/server.rb +57 -34
  73. data/lib/sprockets/source_map_processor.rb +66 -0
  74. data/lib/sprockets/source_map_utils.rb +483 -0
  75. data/lib/sprockets/transformers.rb +63 -35
  76. data/lib/sprockets/uglifier_compressor.rb +23 -20
  77. data/lib/sprockets/unloaded_asset.rb +139 -0
  78. data/lib/sprockets/uri_tar.rb +99 -0
  79. data/lib/sprockets/uri_utils.rb +15 -14
  80. data/lib/sprockets/utils/gzip.rb +99 -0
  81. data/lib/sprockets/utils.rb +43 -59
  82. data/lib/sprockets/version.rb +2 -1
  83. data/lib/sprockets/yui_compressor.rb +5 -14
  84. data/lib/sprockets.rb +103 -33
  85. metadata +151 -22
  86. data/LICENSE +0 -21
  87. data/lib/sprockets/coffee_script_template.rb +0 -6
  88. data/lib/sprockets/eco_template.rb +0 -6
  89. data/lib/sprockets/ejs_template.rb +0 -6
  90. data/lib/sprockets/engines.rb +0 -81
  91. data/lib/sprockets/erb_template.rb +0 -6
  92. data/lib/sprockets/legacy.rb +0 -314
  93. data/lib/sprockets/legacy_proc_processor.rb +0 -35
  94. data/lib/sprockets/legacy_tilt_processor.rb +0 -29
  95. data/lib/sprockets/sass_template.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 196e262a4bc69c0989859f510f703ccf2b2c16ca
4
- data.tar.gz: 8c511861fd25f35955e3f4c748bf97a1ef49dc6b
2
+ SHA256:
3
+ metadata.gz: a4743994bc846327ac80bde662aa5a26fd95ce5cca2dd149deafe0fe94b6bf00
4
+ data.tar.gz: 454485ef7d2c5aac60c69b7d7042ed1b74245afecfeadc72c7e9bc290dc8b5b8
5
5
  SHA512:
6
- metadata.gz: 78fed6b263b253262e03d814f7b1989da90e4c840a7be325a6bae7ff40d58dbc807ae9469f95400ef8fbf33f1ade9746757344a42da29c48dc0a228567337d71
7
- data.tar.gz: 1798e1b5216d9c9ed70056b0a828f3ac7a119e0dd2773a590a80dec4b209f93c12eedc7ee7e49b00381df16d91891fc124ca7d0aa59253e9602dc34a398d79ed
6
+ metadata.gz: c6d61894b3f53a76bf1f04c3f2fe74143b33e43d5fbdc3db216bdf0ad88d06f8a73fc61bd12071ee79e8aab49b36cb14685f6bb2d86582387cbc5522cef305a3
7
+ data.tar.gz: ca2bff624116f6de55ce4f9c6371be9d71245d2883c4837cf5a1b4969006fbdf8507b358c7986cccb03edb00711367538176ed2701a1e725cde1206163c64e2c
data/CHANGELOG.md ADDED
@@ -0,0 +1,76 @@
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.0.2
6
+
7
+ - Fix `etag` and digest path compilation that were generating string with invalid digest since 4.0.1.
8
+
9
+ ## 4.0.1
10
+
11
+ - Fix for Ruby 2.7 keyword arguments warning in `base.rb`. [#660](https://github.com/rails/sprockets/pull/660)
12
+ - Fix for when `x_sprockets_linecount` is missing from a source map.
13
+ - Fix subresource integrity to match the digest of the asset.
14
+
15
+ ## 4.0.0
16
+
17
+ - Fixes for Ruby 2.7 keyword arguments warnings [#625](https://github.com/rails/sprockets/pull/625)
18
+ - Manifest files are sorted alphabetically [#626](https://github.com/rails/sprockets/pull/626)
19
+
20
+ ## 4.0.0.beta10
21
+
22
+ - Fix YACB (Yet Another Caching Bug) [Fix broken expansion of asset link paths](https://github.com/rails/sprockets/pull/614)
23
+
24
+ ## 4.0.0.beta9
25
+
26
+ - Minimum Ruby version for Sprockets 4 is now 2.5+ which matches minimum ruby verision of Rails [#604]
27
+ - Fix threading bug introduced in Sprockets 4 [#603]
28
+ - Warn when two potential manifest files exist. [#560]
29
+
30
+ ## 4.0.0.beta8
31
+
32
+ - Security release for [CVE-2018-3760](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3760)
33
+
34
+ ## 4.0.0.beta7
35
+
36
+ - Fix a year long bug that caused `Sprockets::FileNotFound` errors when the asset was present [#547]
37
+ - Raise an error when two assets such as foo.js and foo.js.erb would produce the same output artifact (foo.js) [#549 #530]
38
+ - Process `*.jst.eco.erb` files with ERBProcessor
39
+
40
+ ## 4.0.0.beta6
41
+
42
+ - Fix source map line offsets [#515]
43
+ - Return a `400 Bad Request` when the path encoding is invalid. [#514]
44
+
45
+ ## 4.0.0.beta5
46
+
47
+ - Reduce string allocations
48
+ - Source map metadata uses compressed form specified by the [source map v3 spec](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k). [#402] **[BREAKING]**
49
+ - Generate [index maps](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt) when decoding source maps isn't necessary. [#402]
50
+ - Remove fingerprints from source map files. [#402]
51
+
52
+ ## 4.0.0.beta4
53
+
54
+ - Changing the version now busts the digest of all assets [#404]
55
+ - Exporter interface added [#386]
56
+ - Using ENV vars in templates will recompile templates when the env vars change. [#365]
57
+ - Source maps for imported sass files with sassc is now fixed [#391]
58
+ - Load paths now in error messages [#322]
59
+ - Cache key added to babel processor [#387]
60
+ - `Environment#find_asset!` can now be used to raise an exception when asset could not be found [#379]
61
+
62
+ ## 4.0.0.beta3
63
+
64
+ - Source Map fixes [#255] [#367]
65
+ - Performance improvements
66
+
67
+ ## 4.0.0.beta2
68
+
69
+ - Fix load_paths on Sass processors [#223]
70
+
71
+
72
+ ## 4.0.0.beta1
73
+
74
+ - Initial release of Sprockets 4
75
+
76
+ 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.