Skip to content
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

Remove deprecated webpacker spelling #429

Merged
merged 9 commits into from
Mar 8, 2024
Merged

Conversation

tomdracz
Copy link
Collaborator

@tomdracz tomdracz commented Mar 6, 2024

Summary

Closes #398

Drops backwards compatibility with Webpacker spelling, constants, ENV variables etc that have been deprecated in v7.

Pull Request checklist

  • Add/update test to cover these changes
  • Update documentation
  • Update CHANGELOG file

@tomdracz tomdracz changed the base branch from main to next March 6, 2024 19:01
@tomdracz
Copy link
Collaborator Author

tomdracz commented Mar 6, 2024

@justin808 I think some remaining failures on this one are due to react-on-rails being used in the dummy app and that one still referencing Webpacker constants

https://github.com/shakacode/shakapacker/actions/runs/8177448565/job/22359120922#step:6:206

Webpacker heavily used in https://github.com/shakacode/react_on_rails/blob/master/lib/react_on_rails/webpacker_utils.rb

Any plans to drop that/support both Webpacker/Shakapacker?

@@ -19,6 +19,9 @@
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

# Temp patch for dummy specs
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As per #429 (comment) - this is temp patch for dummy specs that are using react-on-rails as that still expects Webpacker constant to be present. Can be removed once we address in react-on-rails

@ahangarha
Copy link
Contributor

This PR is more like removing backward compatibility rather than removing deprecation messages.

Am I right?

@tomdracz
Copy link
Collaborator Author

tomdracz commented Mar 7, 2024

@ahangarha correct! Removes all backwards compatibility layer ends deprecated changes it was trying to keep compatible in the deprecation period!

Copy link
Contributor

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

woot woot! :shipit:

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

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

Looks GREAT. But I skimmed the diffs.

How confident are @tomdracz and @G-Rath and @ahangarha ? If you all are, I'll merge!

@tomdracz
Copy link
Collaborator Author

tomdracz commented Mar 8, 2024

Pretty confident @justin808 Test suite should give us enough confidence and I ran some sense checks with no issues. @ahangarha initial work in adding this was nicely commented and named so it was easy enough to find all instances to remove.

Should be good to go!

@G-Rath
Copy link
Contributor

G-Rath commented Mar 8, 2024

& we're landing this on next first, so we'll have some time to find anything we've missed as we're landing other breaking changes :)

@tomdracz
Copy link
Collaborator Author

tomdracz commented Mar 8, 2024

Merging as I know you have some PRs in flight @G-Rath that will probably warrant from rebase after this!

@tomdracz tomdracz merged commit 913c56a into next Mar 8, 2024
33 checks passed
@tomdracz tomdracz deleted the remove-deprecated-webpacker branch March 8, 2024 18:57
@ahangarha
Copy link
Contributor

I am happy that my approach in adding backward compatibility made it easy to remove it now 👍🏾

ahangarha pushed a commit that referenced this pull request Mar 28, 2024
justin808 added a commit that referenced this pull request May 8, 2024
* Remove deprecated webpacker spelling (#429)
* feat!: drop support for Ruby 2.6 (#415)
* feat!: remove `https` option (#414)
* feat!: remove `relative_url_root` option (#413)
* feat!: drop support for Node v12 (#431)
* feat!: remove `yarn_install` task (#412)
* ci: cancel in-progress jobs when new changes are pushed (#432)
* ci: merge ruby and node based jobs into single workflows (#434)
* ci: merge node related checks into a single workflow
* ci: merge ruby related checks into a single workflow
* ci: rename jobs
* ci: test against Ruby 3.1 and 3.2, and Node 20 (#433)
* ci: test against Ruby 3.1 and 3.2
* ci: test against Node 20
* ci: only run Rubocop with latest Ruby (#438)
* chore: update pull request template (#437)
* ci: test against Rails 7.1 (#436)
* feat!: remove `globalMutableWebpackConfig` (#439)
* ci: don't run on pushes to `next` (#444)
* feat!: remove `verify_file_existance` method (#446)
* feat!: remove `check_yarn` task (#443)
* ci: use latest bundler in generator jobs (#445)
* feat!: enable `ensure_consistent_versioning` by default (#447)
* Remove dependency on glob (#435)
* Remove dependency on glob
* Pass in shakapacker config consistently (#448)
* Reference config from config rather than instance in compiler
* Strip additional_paths from the asset paths generated in the file.js rule (#403)
* Add config.includePaths and strip includePaths from file.js output paths
* Refactor code to fix lint issue
* Make sure to replace only once
* Change variable name
* Revert includePath change and make stripping additional_paths opt-in
* refactor: use snake_case for method name (#450)
* fix: only strip paths that start with source path (#451)
* feat!: always use `package_json` for managing node packages (#430)
* feat!: minor cleanup of js utilities (#454)
* test: require `ostruct` explicitly (#460)
* ci: only run ESLint on latest Node (#462)
* docs: create upgrade guide for v8 (#458)
* V8 upgrade guide
* docs: write v8 upgrade doc
* docs: format with Prettier
* feat!: move tests and helpers into  (#459)
* test: move into `test` directory
* test: update import paths
* test: update jest config
* refactor: move test helpers
* test: move jest config into dedicated file
* docs: add changelog entry
* chore: remove unneeded eslint ignore
* refactor: update js linting (#461)
* refactor: setup and apply Prettier (#463)
* refactor: use `eslint-plugin-jest` (#464)
@coderabbitai coderabbitai bot mentioned this pull request May 8, 2024
3 tasks
tagliala added a commit to tagliala/inline_svg that referenced this pull request May 19, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit checks if Shakapacker is defined, otherwise it falls back
on Webpacker.

Ref: shakacode/shakapacker#429

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request May 19, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit checks if Shakapacker is defined, otherwise it falls back
on Webpacker.

Ref: shakacode/shakapacker#429

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request May 19, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit checks if Shakapacker is defined, otherwise it falls back
on Webpacker.

It also uses the scope resolution operator to resolve at top-level
scope.

Ref: shakacode/shakapacker#429

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request May 19, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit also:
- Checks if `Shakapacker` is defined; if not, it falls back on
  `Webpacker`.
- Uses the scope resolution operator to resolve at top-level
  scope
- Does not assume that `dev_server.https?` is available

Refs:
- shakacode/shakapacker#414
- shakacode/shakapacker#429

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request May 22, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit also:
- Checks if `Shakapacker` is defined; if not, it falls back on
  `Webpacker`.
- Uses the scope resolution operator to resolve at top-level
  scope
- Does not assume that `dev_server.https?` is available

Refs:
- shakacode/shakapacker#414
- shakacode/shakapacker#429

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request May 24, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit also:
- Checks if `Shakapacker` is defined; if not, it falls back on
  `Webpacker`.
- Uses the scope resolution operator to resolve at top-level
  scope
- Checks `protocol` instead of `https?` because the former is available
  from Webpacker 3 and the latter is not available anymore in
  Shakapacker >= 8

Refs:
- shakacode/shakapacker#414
- shakacode/shakapacker#429

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request May 25, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit also:
- Checks if `Shakapacker` is defined; if not, it falls back on
  `Webpacker`.
- Uses the scope resolution operator to resolve at top-level
  scope
- Checks `protocol` instead of `https?` because the former is available
  from Webpacker 3 and the latter is not available anymore in
  Shakapacker >= 8

Refs:
- shakacode/shakapacker#414
- shakacode/shakapacker#429
- shakacode/shakapacker#486

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request Jun 24, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit also:
- Checks if `Shakapacker` is defined; if not, it falls back on
  `Webpacker`.
- Uses the scope resolution operator to resolve at top-level
  scope
- Checks `protocol` instead of `https?` because the former is available
  from Webpacker 3 and the latter is not available anymore in
  Shakapacker >= 8

Refs:
- shakacode/shakapacker#414
- shakacode/shakapacker#429
- shakacode/shakapacker#486

Close jamesmartin#156
tagliala added a commit to tagliala/inline_svg that referenced this pull request Jul 27, 2024
Shakapacker is the official, actively maintained successor to Webpacker.

Shakapacker v7 changed the spelling of `Webpacker` to `Shakapacker` in
the entire project, but still provided backward compatibility for
`Webpacker` spelling.

v8 dropped the deprecated spelling

This commit also:
- Checks if `Shakapacker` is defined; if not, it falls back on
  `Webpacker`.
- Uses the scope resolution operator to resolve at top-level
  scope
- Checks `protocol` instead of `https?` because the former is available
  from Webpacker 3 and the latter is not available anymore in
  Shakapacker >= 8

Refs:
- shakacode/shakapacker#414
- shakacode/shakapacker#429
- shakacode/shakapacker#486

Close jamesmartin#156
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.

4 participants