decidim 0.25.0.rc3 → 0.25.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 353648d800f30d6d1ae533dbcf53e98db11017e0d7fdeca0ed67ba915e1c4f35
4
- data.tar.gz: 911bf9addcf98e2cfcaaa6e9342545255b3b155cd73f10b3b26ca04118833ebb
3
+ metadata.gz: 851371bc981d04a19314104ef053a24a485273b33c18f5485f9806c6501da34b
4
+ data.tar.gz: a418ecab78ab854b906d62dffd5a7c1d9420116508c94e6c9d917ea8b4521039
5
5
  SHA512:
6
- metadata.gz: b599e6f94100f7ffa523d9a8c9445b6829b2a94ba54ca452295bdade86f4721b7836b27afee87524f1131e5ecf43aee076b74032b2aae31366c220622939db29
7
- data.tar.gz: ff97e3b5954f0f22e4716c183c80a210ad8911d42e9fa1888dff1b0eebf1bc5a3d2c22e7d579194e575adcf9ed16629291d999bf2b14c8c9a9016f7b53047275
6
+ metadata.gz: 8061a6cef47d3a2bc5db8d75337ae644a39f6d462cd74aa7c3660af35e3f0a738799d1fce623c2c5d522631d4dadf6cb91c32c7d688815971c4ea274e4baab9c
7
+ data.tar.gz: fb8b1be2eec0d14aa1860cef83154719038e7b891cce443c93a09d229290617c6bc4603e4282c728e0261269ca2509c75f6e354db64b410de41c5e87dcd8db5a
data/Rakefile CHANGED
@@ -80,7 +80,31 @@ task :bundle do
80
80
  [".", "decidim-generators", "decidim_app-design"].each do |dir|
81
81
  Bundler.with_original_env do
82
82
  puts "Updating #{dir}...\n"
83
- Dir.chdir(dir) { sh "bundle install" }
83
+ system!("bundle install", dir)
84
84
  end
85
85
  end
86
86
  end
87
+
88
+ desc "Synchronize npm packages files on the whole repo"
89
+ task :webpack do
90
+ FileUtils.rm_rf(decidim_app_design_path.join("package-lock.json"))
91
+ FileUtils.rm_rf(decidim_app_design_path.join("packages"))
92
+ FileUtils.cp_r(root_folder.join("package.json"), decidim_app_design_path)
93
+ FileUtils.cp_r(root_folder.join("package-lock.json"), decidim_app_design_path)
94
+ FileUtils.cp_r(root_folder.join("packages"), decidim_app_design_path)
95
+
96
+ system!("npm install", root_folder)
97
+ system!("npm install", decidim_app_design_path)
98
+ end
99
+
100
+ def root_folder
101
+ @root_folder ||= Pathname.new(__dir__)
102
+ end
103
+
104
+ def decidim_app_design_path
105
+ @decidim_app_design_path ||= Pathname.new(root_folder.join("decidim_app-design"))
106
+ end
107
+
108
+ def system!(command, path)
109
+ system("cd #{path} && #{command}") || abort("\n== Command #{command} failed ==")
110
+ end
@@ -15,8 +15,8 @@ It's recommended to understand how Webpacker works. More information:
15
15
 
16
16
  Before starting the migration, please check you have the following dependencies installed:
17
17
 
18
- - Node.js version 15.14.0 (this version is mandatory)
19
- - Npm version 7.7.0 (it works with other versions, but this is the recommended)
18
+ - Node.js version 16.9.x (this version is mandatory)
19
+ - Npm version 7.21.x (it works with other versions, but this is the recommended)
20
20
 
21
21
  == Add Webpacker to the application
22
22
 
@@ -144,6 +144,16 @@ require "decidim/rails"
144
144
 
145
145
  * In `config/environments/*.rb` remove any line containing `config.assets.*` (i.e `config.assets.debug = true`)
146
146
 
147
+ === Help Decidim to know the application's assets folder
148
+
149
+ To prevent Zeitwerk issues trying to autoload the non-ruby application folders, modify the `config/initializers/decidim.rb` file to include the following:
150
+
151
+ [source,ruby]
152
+ ---
153
+ # Inform Decidim about the assets folder
154
+ Decidim.register_assets_path File.expand_path("app/packs", Rails.application.root)
155
+ ---
156
+
147
157
  == Deployment
148
158
 
149
159
  The deployment needs to be updated to manually run `npm install` before assets are precompiled.
@@ -173,3 +183,16 @@ Also, in the case of Capistrano it's interesting to add to the shared_paths the
173
183
  * `tmp/webpacker-cache`
174
184
  * `node_modules`
175
185
  * `public/decidim-packs`
186
+
187
+ == Troubleshooting
188
+
189
+ If you have the following exception when executing `bundle exec rails decidim:upgrade` or `bundle exec rails decidim:webpacker:install`
190
+
191
+ [source,console]
192
+ ----
193
+ npm ERR! code ERESOLVE
194
+ npm ERR! ERESOLVE unable to resolve dependency tree
195
+ npm ERR!
196
+ ----
197
+
198
+ Then you need to check again that you're using the correct Node.js and NPM versions.
@@ -119,3 +119,14 @@ Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/your_componen
119
119
  # Register the admin panel's stylesheet include statement:
120
120
  Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/your_component/your_component_admin", group: :admin)
121
121
  ----
122
+
123
+ === Help Decidim to know the module's assets folder
124
+
125
+ To prevent Zeitwerk issues trying to autoload the non-ruby module folders, modify the `lib/[module_name]/engine.rb` file to include the following:
126
+
127
+ [source,ruby]
128
+ ---
129
+ initializer "[module_name].webpacker.assets_path" do
130
+ Decidim.register_assets_path File.expand_path("app/packs", root)
131
+ end
132
+ ---
@@ -5,8 +5,8 @@ In order to develop on decidim, you'll need:
5
5
  * *Git* 2.15+
6
6
  * *PostgreSQL* 12.7+
7
7
  * *Ruby* 2.7.1
8
- * *NodeJS* 15.14.x
9
- * *Npm* 7.7.x
8
+ * *NodeJS* 16.9.x
9
+ * *Npm* 7.21.x
10
10
  * *ImageMagick*
11
11
  * *Chrome* browser and https://sites.google.com/a/chromium.org/chromedriver/[chromedriver].
12
12
 
@@ -3,6 +3,6 @@
3
3
  # This holds the decidim version and the faker version it uses.
4
4
  module Decidim
5
5
  def self.version
6
- "0.25.0.rc3"
6
+ "0.25.2"
7
7
  end
8
8
  end