sprockets 3.0.0 → 4.0.0

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 +68 -0
  3. data/README.md +397 -408
  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 +19 -23
  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 +59 -11
  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 +72 -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 +236 -69
  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: cbc5f0a881069d09632a087bb32f43c8e5d01a631f2ff6fbc6e776e3695bd51c
4
+ data.tar.gz: 580922aaccc4defd65fdf239b441f7e8e96216d98dae8fdfe0a64afc3b40a4bc
5
5
  SHA512:
6
- metadata.gz: 78fed6b263b253262e03d814f7b1989da90e4c840a7be325a6bae7ff40d58dbc807ae9469f95400ef8fbf33f1ade9746757344a42da29c48dc0a228567337d71
7
- data.tar.gz: 1798e1b5216d9c9ed70056b0a828f3ac7a119e0dd2773a590a80dec4b209f93c12eedc7ee7e49b00381df16d91891fc124ca7d0aa59253e9602dc34a398d79ed
6
+ metadata.gz: f474ef02d068783020ae4a3833bded8783d1a1bfa1ee5ae106dd7e8dfbcf12723c8582155cb44c0594b0c36bcad476b7139814f2577fa2e25a82ad6675763dc4
7
+ data.tar.gz: 853bbac33f50b2097126190c01bdc182306b7aa7132d50b91248efd1dcc1b7a35863fa1a5e529eacc8d967ee9d2de8083ae68b72e02889e01a821d794d0ad147
data/CHANGELOG.md ADDED
@@ -0,0 +1,68 @@
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
+ ## Master
6
+
7
+ ## 4.0.0
8
+
9
+ - Fixes for Ruby 2.7 keyword arguments warnings [#625](https://github.com/rails/sprockets/pull/625)
10
+ - Manifest files are sorted alphabetically [#626](https://github.com/rails/sprockets/pull/626)
11
+
12
+ ## 4.0.0.beta10
13
+
14
+ - Fix YACB (Yet Another Caching Bug) [Fix broken expansion of asset link paths](https://github.com/rails/sprockets/pull/614)
15
+
16
+ ## 4.0.0.beta9
17
+
18
+ - Minimum Ruby version for Sprockets 4 is now 2.5+ which matches minimum ruby verision of Rails [#604]
19
+ - Fix threading bug introduced in Sprockets 4 [#603]
20
+ - Warn when two potential manifest files exist. [#560]
21
+
22
+ ## 4.0.0.beta8
23
+
24
+ - Security release for [CVE-2018-3760](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3760)
25
+
26
+ ## 4.0.0.beta7
27
+
28
+ - Fix a year long bug that caused `Sprockets::FileNotFound` errors when the asset was present [#547]
29
+ - Raise an error when two assets such as foo.js and foo.js.erb would produce the same output artifact (foo.js) [#549 #530]
30
+ - Process `*.jst.eco.erb` files with ERBProcessor
31
+
32
+ ## 4.0.0.beta6
33
+
34
+ - Fix source map line offsets [#515]
35
+ - Return a `400 Bad Request` when the path encoding is invalid. [#514]
36
+
37
+ ## 4.0.0.beta5
38
+
39
+ - Reduce string allocations
40
+ - Source map metadata uses compressed form specified by the [source map v3 spec](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k). [#402] **[BREAKING]**
41
+ - Generate [index maps](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt) when decoding source maps isn't necessary. [#402]
42
+ - Remove fingerprints from source map files. [#402]
43
+
44
+ ## 4.0.0.beta4
45
+
46
+ - Changing the version now busts the digest of all assets [#404]
47
+ - Exporter interface added [#386]
48
+ - Using ENV vars in templates will recompile templates when the env vars change. [#365]
49
+ - Source maps for imported sass files with sassc is now fixed [#391]
50
+ - Load paths now in error messages [#322]
51
+ - Cache key added to babel processor [#387]
52
+ - `Environment#find_asset!` can now be used to raise an exception when asset could not be found [#379]
53
+
54
+ ## 4.0.0.beta3
55
+
56
+ - Source Map fixes [#255] [#367]
57
+ - Performance improvements
58
+
59
+ ## 4.0.0.beta2
60
+
61
+ - Fix load_paths on Sass processors [#223]
62
+
63
+
64
+ ## 4.0.0.beta1
65
+
66
+ - Initial release of Sprockets 4
67
+
68
+ 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.