decidim 0.25.0.rc3 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/Rakefile +25 -1
 - data/docs/modules/develop/pages/guide_migrate_webpacker_app.adoc +25 -2
 - data/docs/modules/develop/pages/guide_migrate_webpacker_module.adoc +11 -0
 - data/docs/modules/install/pages/manual.adoc +2 -2
 - data/lib/decidim/version.rb +1 -1
 - data/package-lock.json +35 -1532
 - data/package.json +3 -4
 - data/packages/browserslist-config/package.json +2 -6
 - data/packages/core/package.json +4 -4
 - data/packages/dev/package.json +1 -5
 - data/packages/elections/package.json +1 -5
 - data/packages/eslint-config/package.json +1 -5
 - data/packages/stylelint-config/package.json +2 -6
 - data/packages/webpacker/package.json +2 -7
 - metadata +47 -47
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 851371bc981d04a19314104ef053a24a485273b33c18f5485f9806c6501da34b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a418ecab78ab854b906d62dffd5a7c1d9420116508c94e6c9d917ea8b4521039
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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 
     | 
    
         
            -
                   
     | 
| 
      
 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  
     | 
| 
       19 
     | 
    
         
            -
            - Npm version 7. 
     | 
| 
      
 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*  
     | 
| 
       9 
     | 
    
         
            -
            * *Npm* 7. 
     | 
| 
      
 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 
     | 
    
         |