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

Shakapacker Version 7 #277

Merged
merged 8 commits into from
Apr 27, 2023
Merged

Shakapacker Version 7 #277

merged 8 commits into from
Apr 27, 2023

Conversation

ahangarha
Copy link
Contributor

Summary

All spellings for Webpacker are renamed to Shakapacker.

Pull Request checklist

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

These changes are tested on react_on_rails_demo_ssr_hmr.

closes #157

* Use Shakapacker module, config files, and env variables
* Update tests to use shakapacker module and config files
* Rename rake files to shakapacker
* rename binstubs in test app
* Update rake tasks and their specs
* Update shakapacker_precompile entry in config file
* Fix installation scripts
* Replace remaining instances of webpacker
* Update JS code and tests
* Update description of clean rake tasks
* Update changelog
* Add v7 upgrade guide
* Change Webpacker reference to Shakapacker in docs
* Update Readme and contribution guide for shakapacker
* Use Shakapacker module, config filesm, and env variables
* Rename rake files to shakapacker
* Update JS code and tests
* Fix conflict
* Update Readme and contribution guide for shakapacker
* Remove debug lines
* Fix linter issue
* Use Shakapacker module, config filesm, and env variables
* Add support for old configfile
* Add rake tasks
* Add files to support requiring Webpacker module
* Add backward compatibility test
* Add rake task for backward compatibility test
* Add CI for backward compatibility specs
* Add backward compatibility to JS package
* Add backward compatibility for --debug-shakapacker option
* Fix chdir in afterAll hook in js tests
* Fix js tests for compiling files in source_path
* Use symlink address for config file
* Use fs.existsSync to check if file exist
* Remove a redundant assignment
* Improve deprecation messages
* Improve gitignore in test apps
* Improve deprecation message for env variables
* Update documentation
* Show deprecation message for old binstubs
* Update changelog
* Add and improve test for custom config path in env variable
* Improve robustness in config.fetch method
* Update docs
* Update deprecation message
* Simplify config.fetch method
* Remove lines releated to git conflict
* Improve the order of code
* Add v7 upgrade guide link to changelog
* Update Changelog

* Simplify docs for spelling change
* Remove redundant code for enhancing precompile task
* Set allowed_host to auto as per webpack recommendation
* Use server: http instead of https: false
* Remove server entry from config and improve value detection
* Add support for hash value for server entry
* Update dev_server_runner to use protocol
* Add server or https entry conditionally
* Add support for other standard devServer config

In this commit, I add support for those keys written in snake-case to be
added to the configurations in camel-case format, if they are set.

The logic for mapping keys in the shakapacker.yml file is straightforward: if
a key is specific to webpack, it will be mapped to camelCase; otherwise, the
key will remain as is. Any other key not specific to
webpack (such as random_key) will remain accessible in its original form.

* Run the logic only in a dev environment
* Set specific exception type for rescue
@ahangarha
Copy link
Contributor Author

I am wondering if using puts to print out deprecation messages is a good decision. Shakapacker utilizes a logger from Rails. Shouldn't we use that?

tomdracz and others added 2 commits April 19, 2023 16:08
* Stop stripping out top level directories in file loader
* Account for top level files
* Add changelog entry
* Don't use dynamic source path
* Set source_entry_path to packs
* Process source_entry_path as a relative path
* Improve comments for source_entry_path
* Set nested_entries to true in config file
@justin808 justin808 changed the title Change spelling to Shakapcker with backward compatibility Change spelling to Shakapacker with backward compatibility Apr 19, 2023
@justin808
Copy link
Member

Are we ready to put a beta version out with this? @tomdracz @ahangarha

@ahangarha ahangarha changed the title Change spelling to Shakapacker with backward compatibility Shakapacker Version 7 Apr 20, 2023
@ahangarha ahangarha merged commit a157223 into master Apr 27, 2023
@ahangarha ahangarha deleted the shakapacker-v7 branch April 27, 2023 07:50
@ahangarha ahangarha restored the shakapacker-v7 branch May 7, 2023 15:17
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.

Rename all references of webpacker to shakapacker
3 participants