Skip to content

Bump @activeadmin/activeadmin from 4.0.0-beta9 to 4.0.0-beta15 and @rails/ujs from 7.1.2 to 7.1.400 #875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

patrick204nqh
Copy link
Contributor

@patrick204nqh patrick204nqh commented Jan 16, 2025

Hi @tagliala @javierjulio,

It seems like the problem is related to an outdated npm package that is incompatible with the activeadmin gem version 4.0.0.beta14.

gem "activeadmin", "4.0.0.beta14" # github: "activeadmin/activeadmin", branch: "master"

Problem Output

Click to view the problem output
08:45:31 web.1  | started with pid 512839
08:45:31 css.1  | started with pid 512840
08:45:31 css.1  | yarn run v1.22.22
08:45:31 css.1  | $ tailwindcss -i ./app/assets/stylesheets/active_admin.css -o ./app/assets/builds/active_admin.css --minify -c tailwind-active_admin.config.js --watch
08:45:31 css.1  | 
08:45:31 css.1  | Rebuilding...
08:45:32 web.1  | DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/xxxx/rdbg-xxxxxx)
08:45:32 web.1  | => Booting Puma
08:45:32 web.1  | => Rails 7.2.2.1 application starting in development 
08:45:32 web.1  | => Run `bin/rails server --help` for more startup options
08:45:32 css.1  | (node:512950) ExperimentalWarning: CommonJS module ~/demo.activeadmin.info/tailwind-active_admin.config.js is loading ES Module ~/demo.activeadmin.info/node_modules/@activeadmin/activeadmin/plugin.js using require().
08:45:32 css.1  | Support for loading ES Module in require() is an experimental feature and might change at any time
08:45:32 css.1  | (Use `node --trace-warnings ...` to show where the warning was created)
08:45:32 css.1  | file://~/demo.activeadmin.info/node_modules/@activeadmin/activeadmin/plugin.js:1
08:45:32 css.1  | const plugin = require('tailwindcss/plugin')
08:45:32 css.1  |                ^
08:45:32 css.1  | 
08:45:32 css.1  | ReferenceError: require is not defined
08:45:32 css.1  |     at file://~/demo.activeadmin.info/node_modules/@activeadmin/activeadmin/plugin.js:1:16
08:45:32 css.1  |     at ModuleJobSync.runSync (node:internal/modules/esm/module_job:367:35)
08:45:32 css.1  |     at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:325:47)
08:45:32 css.1  |     at loadESMFromCJS (node:internal/modules/cjs/loader:1396:24)
08:45:32 css.1  |     at Module._compile (node:internal/modules/cjs/loader:1529:5)
08:45:32 css.1  |     at Object..js (node:internal/modules/cjs/loader:1678:16)
08:45:32 css.1  |     at Module.load (node:internal/modules/cjs/loader:1315:32)
08:45:32 css.1  |     at Function._load (node:internal/modules/cjs/loader:1125:12)
08:45:32 css.1  |     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
08:45:32 css.1  |     at wrapModuleLoad (node:internal/modules/cjs/loader:216:24)
08:45:32 css.1  | 
08:45:32 css.1  | Node.js v23.1.0
08:45:32 css.1  | error Command failed with exit code 1.
08:45:32 css.1  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
08:45:33 web.1  | Puma starting in single mode...
08:45:33 web.1  | * Puma version: 6.5.0 ("Sky's Version")
08:45:33 web.1  | * Ruby version: ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]
08:45:33 web.1  | *  Min threads: 3
08:45:33 web.1  | *  Max threads: 3
08:45:33 web.1  | *  Environment: development
08:45:33 web.1  | *          PID: 512839
08:45:33 web.1  | * Listening on http://127.0.0.1:5000
08:45:33 web.1  | * Listening on http://[::1]:5000
08:45:33 web.1  | Use Ctrl-C to stop
08:45:33 css.1  | exited with code 1
08:45:33 system | sending SIGTERM to all processes

So I tried changing the version of @activeadmin/activeadmin to the latest version (4.0.0-beta9 => 4.0.0-beta15), and it worked well.

Please let me know if you have any questions or require further changes.

@patrick204nqh patrick204nqh marked this pull request as ready for review January 16, 2025 02:12
Copy link
Contributor

@tagliala tagliala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR,

can you please also update

gem "activeadmin", "4.0.0.beta14" # github: "activeadmin/activeadmin", branch: "master"

and bundle update ?

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.08%. Comparing base (4bc7216) to head (284ead3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #875   +/-   ##
=======================================
  Coverage   99.08%   99.08%           
=======================================
  Files          14       14           
  Lines         109      109           
=======================================
  Hits          108      108           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@patrick204nqh
Copy link
Contributor Author

patrick204nqh commented Jan 17, 2025

Thanks for your feedback. I have updated

Here is the checklist

  • Run bundle install
  • Run bin/rails db:setup test:all and make sure all tests pass without any errors.
Output
Running 14 tests in a single process (parallelization threshold is 50)
Run options: --seed 39717

# Running:

Capybara starting Puma...
* Version 6.5.0, codename: Sky's Version
* Min threads: 0, max threads: 4
* Listening on http://127.0.0.1:45287
..............

Finished in 4.199709s, 3.3336 runs/s, 7.3815 assertions/s.
14 runs, 31 assertions, 0 failures, 0 errors, 0 skips

Please review the changes and let me know if there are any further adjustments needed. 🤠

@tagliala
Copy link
Contributor

Thanks!

@tagliala tagliala merged commit 3dfc1c9 into activeadmin:main Jan 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants