webpacker 3.5.5 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b71d06e4c3b26132fe071d34ab0e6cf16ee5972928e8455f020016d9f8e9c4fc
4
- data.tar.gz: d3ab16ffe934cb08285dfc1399f0afd0f7a2643e2d4b73bef568bfec81faafd7
3
+ metadata.gz: 99d9c3eb9fa58026b2fa47c4c2f43ee0c8d69cb476b1ea4fc1c8615135444d92
4
+ data.tar.gz: 50c7982498e8955c5eef5877da86599600874abfe976f7a985df591c350df4d8
5
5
  SHA512:
6
- metadata.gz: ff65fabb9b0802dc4eb2fedc7026d1f2655520e421e77aed9a15c690856bd8d30c99026e6ce07847f8a08c076872a5b5558fcf6adb0033469d0a149f3e0060f5
7
- data.tar.gz: 9847cb5cc56b6da3cb02000a6f37d16c20cdda5139818443be85d775204566299c60bcdc8d9595dfe593625e63dd1bdb8ff29c6660897b551e6e5efe2b84445f
6
+ metadata.gz: e12e68bf1ebdb90e203d20b90bc7a9664593e9643d3459bf4ff3810bea35e6fc1a9f29a8946a50c6f3765e342b74283edb267715e31154313ccd4c9a22eb458b
7
+ data.tar.gz: 51f758aebcbd9f443c6eaae1cef267e90c57262a0dc3e17619cf24b84c04286d7891b58325db1646ea00c2b639d3047036227bac321a411b31416ce5702c900e
@@ -1,5 +1,9 @@
1
1
  **Please note that Webpacker 3.1.0 and 3.1.1 have some serious bugs so please consider using either 3.0.2 or 3.2.0**
2
2
 
3
+ ## [3.6.0] - 2019-03-06
4
+ See changes: https://github.com/rails/webpacker/compare/88a253ed42966eb2d5c997435e9396881513bce1...3-x-stable
5
+
6
+
3
7
  ## [3.5.5] - 2018-07-09
4
8
  See changes: https://github.com/rails/webpacker/compare/e8b197e36c77181ca2e4765c620faea59dcd0351...3-x-stable
5
9
 
@@ -33,7 +37,7 @@
33
37
  ### Added
34
38
  - `image_pack_tag` helper [#1400](https://github.com/rails/webpacker/pull/1400)
35
39
  - devserver proxy for custom environments [#1415](https://github.com/rails/webpacker/pull/1415)
36
- - Rails webpacker:info task [#1416](https://github.com/rails/webpacker/pull/1416)
40
+ - Rails webpacker:info task [#1416](https://github.com/rails/webpacker/pull/1416)
37
41
  - Include `RAILS_RELATIVE_URL_ROOT` environment variable in publicPath [#1428](https://github.com/rails/webpacker/pull/1428)
38
42
 
39
43
  Complete list of changes: [#1464](https://github.com/rails/webpacker/pull/1464)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webpacker (3.5.5)
4
+ webpacker (3.6.0)
5
5
  activesupport (>= 4.2)
6
6
  rack-proxy (>= 0.6.1)
7
7
  railties (>= 4.2)
@@ -151,4 +151,4 @@ DEPENDENCIES
151
151
  webpacker!
152
152
 
153
153
  BUNDLED WITH
154
- 1.16.1
154
+ 1.17.3
@@ -144,3 +144,13 @@ environment.loaders.get('sass').use.splice(-1, 0, {
144
144
  }
145
145
  });
146
146
  ```
147
+
148
+ ## Configure [Autoprefixer](https://github.com/postcss/autoprefixer)
149
+
150
+ By default, Autoprefixer does not apply Internet Explorer CSS grid polyfills. If you wish to enable these, or change any other Autoprefixer config, do it through `.postcssrc.yml`:
151
+
152
+ ```yml
153
+ plugins:
154
+ postcss-import: {}
155
+ postcss-cssnext: { features: { autoprefixer: { grid: true } } }
156
+ ```
@@ -117,6 +117,3 @@ environment.plugins.append('ContextReplacement',
117
117
  )
118
118
  )
119
119
  ```
120
-
121
- ## Compilation triggered even when files haven't changed
122
- Webpacker compares the modified times (mtimes) of files to see if they have changed & determine whether to recompile on-demand. For CI environments that clone the repository before running tests, the modified times will be set to when the repository was cloned, not when the file was last modified. To prevent unnecessary recompilation on CI, Webpacker watches for the `CI` environment variable, and instead compares the SHA hashes of all files to determine if they've actually changed. You can enable this behavior outside of CI environemnts, or in those that don't set the `CI` env var, by running `CI=true bin/webpack` (or `webpack-dev-server`).
@@ -5,6 +5,7 @@ default: &default
5
5
  source_entry_path: packs
6
6
  public_output_path: packs
7
7
  cache_path: tmp/cache/webpacker
8
+ webpack_compile_output: false
8
9
 
9
10
  # Additional paths webpack should lookup modules
10
11
  # ['app/assets', 'engine/foo/app/assets']
@@ -48,7 +49,7 @@ development:
48
49
  headers:
49
50
  'Access-Control-Allow-Origin': '*'
50
51
  watch_options:
51
- ignored: /node_modules/
52
+ ignored: '**/node_modules/**'
52
53
 
53
54
 
54
55
  test:
@@ -22,14 +22,15 @@ copy_file "#{__dir__}/examples/elm/Main.elm",
22
22
 
23
23
  say "Installing all Elm dependencies"
24
24
  run "yarn add elm elm-webpack-loader"
25
- run "yarn add --dev elm-hot-loader"
26
- run "yarn run elm package install -- --yes"
25
+ run "yarn add --dev elm-hot-webpack-loader"
26
+ run "yarn run elm init"
27
+ run "yarn run elm make"
27
28
 
28
29
  say "Updating webpack paths to include .elm file extension"
29
30
  insert_into_file Webpacker.config.config_path, " - .elm\n", after: /extensions:\n/
30
31
 
31
32
  say "Updating Elm source location"
32
- gsub_file "elm-package.json", /\"\.\"\n/,
33
+ gsub_file "elm.json", /\"\src\"\n/,
33
34
  %("#{Webpacker.config.source_path.relative_path_from(Rails.root)}"\n)
34
35
 
35
36
  say "Updating .gitignore to include elm-stuff folder"
@@ -1,5 +1,6 @@
1
1
  module Main exposing (..)
2
2
 
3
+ import Browser
3
4
  import Html exposing (Html, h1, text)
4
5
  import Html.Attributes exposing (style)
5
6
 
@@ -21,7 +22,7 @@ view : Model -> Html Message
21
22
  view model =
22
23
  -- The inline style is being used for example purposes in order to keep this example simple and
23
24
  -- avoid loading additional resources. Use a proper stylesheet when building your own app.
24
- h1 [style [("display", "flex"), ("justify-content", "center")]]
25
+ h1 [style "display" "flex", style "justify-content" "center"]
25
26
  [text "Hello Elm!"]
26
27
 
27
28
  -- MESSAGE
@@ -43,11 +44,11 @@ subscriptions model =
43
44
 
44
45
  -- MAIN
45
46
 
46
- main : Program Never Model Message
47
+ main : Program (Maybe {}) Model Message
47
48
  main =
48
- Html.program
49
+ Browser.element
49
50
  {
50
- init = init,
51
+ init = always init,
51
52
  view = view,
52
53
  update = update,
53
54
  subscriptions = subscriptions
@@ -2,11 +2,15 @@
2
2
  // head of your layout file, like app/views/layouts/application.html.erb.
3
3
  // It will render "Hello Elm!" within the page.
4
4
 
5
- import Elm from '../Main'
5
+ import {
6
+ Elm
7
+ } from '../Main'
6
8
 
7
9
  document.addEventListener('DOMContentLoaded', () => {
8
10
  const target = document.createElement('div')
9
11
 
10
12
  document.body.appendChild(target)
11
- Elm.Main.embed(target)
13
+ Elm.Main.init({
14
+ node: target
15
+ })
12
16
  })
@@ -2,12 +2,11 @@ const { resolve } = require('path')
2
2
 
3
3
  const isProduction = process.env.NODE_ENV === 'production'
4
4
  const elmSource = resolve(process.cwd())
5
- const elmMake = `${elmSource}/node_modules/.bin/elm-make`
5
+ const elmBinary = `${elmSource}/node_modules/.bin/elm`
6
6
 
7
- const elmDefaultOptions = { cwd: elmSource, pathToMake: elmMake }
7
+ const elmDefaultOptions = { cwd: elmSource, pathToElm: elmBinary }
8
8
  const developmentOptions = Object.assign({}, elmDefaultOptions, {
9
9
  verbose: true,
10
- warn: true,
11
10
  debug: true
12
11
  })
13
12
 
@@ -19,5 +18,5 @@ const elmWebpackLoader = {
19
18
  module.exports = {
20
19
  test: /\.elm(\.erb)?$/,
21
20
  exclude: [/elm-stuff/, /node_modules/],
22
- use: isProduction ? [elmWebpackLoader] : [{ loader: 'elm-hot-loader' }, elmWebpackLoader]
21
+ use: isProduction ? [elmWebpackLoader] : [{ loader: 'elm-hot-webpack-loader' }, elmWebpackLoader]
23
22
  }
@@ -1,4 +1,5 @@
1
1
  require "active_support/core_ext/module/attribute_accessors"
2
+ require "active_support/core_ext/string/inquiry"
2
3
  require "active_support/logger"
3
4
  require "active_support/tagged_logging"
4
5
 
@@ -44,11 +44,7 @@ class Webpacker::Compiler
44
44
 
45
45
  def watched_files_digest
46
46
  files = Dir[*default_watched_paths, *watched_paths].reject { |f| File.directory?(f) }
47
- file_ids = if ENV["CI"]
48
- files.sort.map { |f| "#{File.basename(f)}/#{Digest::SHA1.file(f).hexdigest}" }
49
- else
50
- files.map { |f| "#{File.basename(f)}/#{File.mtime(f).utc.to_i}" }
51
- end
47
+ file_ids = files.sort.map { |f| "#{File.basename(f)}/#{Digest::SHA1.file(f).hexdigest}" }
52
48
  Digest::SHA1.hexdigest(file_ids.join("/"))
53
49
  end
54
50
 
@@ -68,6 +64,7 @@ class Webpacker::Compiler
68
64
 
69
65
  if status.success?
70
66
  logger.info "Compiled all packs in #{config.public_output_path}"
67
+ logger.info stdout if config.webpack_compile_output?
71
68
  else
72
69
  logger.error "Compilation failed:\n#{sterr}\n#{stdout}"
73
70
  end
@@ -63,6 +63,10 @@ class Webpacker::Configuration
63
63
  fetch(:extensions)
64
64
  end
65
65
 
66
+ def webpack_compile_output?
67
+ fetch(:webpack_compile_output)
68
+ end
69
+
66
70
  private
67
71
  def fetch(key)
68
72
  data.fetch(key, defaults[key])
@@ -1,4 +1,4 @@
1
1
  module Webpacker
2
2
  # Change the version in package.json too, please!
3
- VERSION = "3.5.5".freeze
3
+ VERSION = "3.6.0".freeze
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rails/webpacker",
3
- "version": "3.5.5",
3
+ "version": "3.6.0",
4
4
  "description": "Use webpack to manage app-like JavaScript modules in Rails",
5
5
  "main": "package/index.js",
6
6
  "files": [
@@ -5,6 +5,7 @@ default: &default
5
5
  source_entry_path: packs
6
6
  public_output_path: packs
7
7
  cache_path: tmp/cache/webpacker
8
+ webpack_compile_output: false
8
9
 
9
10
  # Additional paths webpack should lookup modules
10
11
  # ['app/assets', 'engine/foo/app/assets']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.5
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-09 00:00:00.000000000 Z
12
+ date: 2019-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -238,8 +238,8 @@ homepage: https://github.com/rails/webpacker
238
238
  licenses:
239
239
  - MIT
240
240
  metadata:
241
- source_code_uri: https://github.com/rails/webpacker/tree/v3.5.5
242
- changelog_uri: https://github.com/rails/webpacker/blob/v3.5.5/CHANGELOG.md
241
+ source_code_uri: https://github.com/rails/webpacker/tree/v3.6.0
242
+ changelog_uri: https://github.com/rails/webpacker/blob/v3.6.0/CHANGELOG.md
243
243
  post_install_message:
244
244
  rdoc_options: []
245
245
  require_paths:
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  version: '0'
257
257
  requirements: []
258
258
  rubyforge_project:
259
- rubygems_version: 2.7.3
259
+ rubygems_version: 2.7.6
260
260
  signing_key:
261
261
  specification_version: 4
262
262
  summary: Use webpack to manage app-like JavaScript modules in Rails