You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve contributing guideline
* Rename webpacker to shakapcker spec
* Rename backward compatiblity specs to follow rspec naming convention
* Use Thor for printing colorful warning
* Set CIs to run only with push
* Rename doc file for developing the gem
* Remove Rails 5 from CI
* Remove node 12 and add 18 in CI
* Improve readability of compile task
* Move test_app into gem spec directory
* Update contributing docs related to help wanted issues
* Reorganize Changelog
* Improve PR template
_Remove this paragraph and provide a general description of the code changes in your pull
4
-
request... were there any bugs you had fixed? If so, mention them. If
5
-
these bugs have open GitHub issues, be sure to tag them here as well,
6
-
to keep the conversation linked together._
3
+
_Remove this paragraph and describe the code changes in your pull request... were there any bugs you had fixed? If so, mention them. If these bugs have open GitHub issues, tag them here as well to keep the conversation linked._
7
4
8
5
### Pull Request checklist
9
-
_Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by `~`._
6
+
_Remove this line after checking all the items here. If the item does not apply to the PR, both check it out and wrap it by `~`._
10
7
11
8
-[ ] Add/update test to cover these changes
12
9
-[ ] Update documentation
13
-
-[ ] Update CHANGELOG file
14
-
_Add the CHANGELOG entry at the top of the file._
10
+
-[ ] Update CHANGELOG file
15
11
16
12
### Other Information
17
13
18
-
_Remove this parapraph and mention any other important and relevant information such as benchmarks._
14
+
_Remove this paragraph and mention other important and relevant information, such as benchmarks._
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14-19Lines changed: 14 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,6 @@
8
8
Changes since last non-beta release.
9
9
10
10
_Please add entries here for your pull requests that are not yet released._
11
-
### Improved
12
-
- Set CSS modules mode depending on file type. [PR 261](https://github.com/shakacode/shakapacker/pull/261) by [talyuk](https://github.com/talyuk).
13
11
14
12
### Breaking changes
15
13
- Removes defaults passed to `@babel/preset-typescript`. [PR 273](https://github.com/shakacode/shakapacker/pull/273) by [tomdracz](https://github.com/tomdracz).
@@ -18,45 +16,42 @@ _Please add entries here for your pull requests that are not yet released._
18
16
19
17
- Export immutable webpackConfig function. [PR 293](https://github.com/shakacode/shakapacker/pull/293) by [tomdracz](https://github.com/tomdracz).
20
18
21
-
The `webpackConfig` property in the `shakapacker` module has been updated to be a function instead of a global mutable webpack configuration. This function now returns an immutable webpack configuration object, which ensures that any modifications made to it will not affect any other usage of the webpack configuration. If a project still requires the old mutable object, it can be accessed by replacing `webpackConfig` with `globalMutableWebpackConfig`.
19
+
The `webpackConfig` property in the `shakapacker` module has been updated to be a function instead of a global mutable webpack configuration. This function now returns an immutable webpack configuration object, which ensures that any modifications made to it will not affect any other usage of the webpack configuration. If a project still requires the old mutable object, it can be accessed by replacing `webpackConfig` with `globalMutableWebpackConfig`. Check [v7-upgrade](https://github.com/shakacode/shakapacker/blob/master/docs/v7_upgrade.md) documentation for more detail.
22
20
23
-
### Improved
24
-
- Move compilation lock file into the working directory. [PR 272](https://github.com/shakacode/shakapacker/pull/272) by [tomdracz](https://github.com/tomdracz).
21
+
### Added
22
+
- Set CSS modules mode depending on file type. [PR 261](https://github.com/shakacode/shakapacker/pull/261) by [talyuk](https://github.com/talyuk).
23
+
- All standard webpack entries with the camelCase format are now supported in `shakapacker.yml` in snake_case format. [PR276](https://github.com/shakacode/shakapacker/pull/276) by [ahangarha](https://github.com/ahangarha).
24
+
- The `shakapacker:install` rake task now has an option to force overriding files using `FORCE=true` environment variable [PR311](https://github.com/shakacode/shakapacker/pull/311) by [ahangarha](https://github.com/ahangarha).
25
25
26
26
### Changed
27
27
- Rename Webpacker to Shakapacker in the entire project including config files, binstubs, environment variables, etc. with a high degree of backward compatibility.
28
28
29
29
This change might be breaking for certain setups and edge cases. More information: [v7 Upgrade Guide](./docs/v7_upgrade.md)[PR157](https://github.com/shakacode/shakapacker/pull/157) by [ahangarha](https://github.com/ahangarha)
30
-
- Set `source_entry_path` to `packs` and `nested_entries` to `true` in`shakapacker.yml`[PR 284](https://github.com/shakacode/shakapacker/pull/284) by [ahangarha](https://github.com/ahangarha).
31
-
32
-
### Fixed
33
-
- Process `source_entry_path` with values starting with `/` as a relative path to `source_path`[PR 284](https://github.com/shakacode/shakapacker/pull/284) by [ahangarha](https://github.com/ahangarha).
34
30
31
+
- Set `source_entry_path` to `packs` and `nested_entries` to `true` in`shakapacker.yml`[PR 284](https://github.com/shakacode/shakapacker/pull/284) by [ahangarha](https://github.com/ahangarha).
35
32
- Dev server configuration is modified to follow [webpack recommended configurations](https://webpack.js.org/configuration/dev-server/) for dev server. [PR276](https://github.com/shakacode/shakapacker/pull/276) by [ahangarha](https://github.com/ahangarha):
36
-
- Deprecated `https` entry is removed from the default configuration file, allowing to set `server` or `https` as per the project requirements. For more detail, check Webpack documentation. The `https` entry can be effective only if there is no `server` entry in the config file.
33
+
- Deprecated `https` entry is removed from the default configuration file, allowing to set `server` or `https` as per the project requirements. For more detail, check webpack documentation. The `https` entry can be effective only if there is no `server` entry in the config file.
37
34
-`allowed_hosts` is now set to `auto` instead of `all` by default.
38
35
39
-
- Removes defaults passed to `@babel/preset-typescript`. [PR 273](https://github.com/shakacode/shakapacker/pull/273) by [tomdracz](https://github.com/tomdracz).
40
-
41
-
`@babel/preset-typescript` has been initialised in default configuration with `{ allExtensions: true, isTSX: true }` - meaning every file in the codebase was treated as TSX leading to potential issues. This has been removed and returns to sensible default of the preset which is to figure out the file type from the extensions. This change might affect generated output however so it is marked as breaking.
42
-
43
36
- Remove the arbitrary stripping of the top-level directory when generating static file paths. [PR 283](https://github.com/shakacode/shakapacker/pull/283) by [tomdracz](https://github.com/tomdracz).
44
37
45
38
Prior to this change, top level directory of static assets like images and fonts was stripped. This meant that file in `app/javascript/images/image.png` would be output to `static/image.png` directory and could be referenced through helpers as `image_pack_tag("image.jpg")` or `image_pack_tag("static/image.jpg")`.
46
39
47
40
Going forward, the top level directory of static files will be retained so this will necessitate the update of file name references in asset helpers. In the example above, the file sourced from `app/javascript/images/image.png` will be now output to `static/images/image.png` and needs to be referenced as `image_pack_tag("images/image.jpg")` or `image_pack_tag("static/images/image.jpg")`.
48
41
42
+
### Fixed
43
+
- Move compilation lock file into the working directory. [PR 272](https://github.com/shakacode/shakapacker/pull/272) by [tomdracz](https://github.com/tomdracz).
44
+
- Process `source_entry_path` with values starting with `/` as a relative path to `source_path`[PR 284](https://github.com/shakacode/shakapacker/pull/284) by [ahangarha](https://github.com/ahangarha).
45
+
- Removes defaults passed to `@babel/preset-typescript` to make it possible to have projects with mix of JS and TS code [PR 273](https://github.com/shakacode/shakapacker/pull/273) by [tomdracz](https://github.com/tomdracz).
46
+
47
+
`@babel/preset-typescript` has been initialised in default configuration with `{ allExtensions: true, isTSX: true }` - meaning every file in the codebase was treated as TSX leading to potential issues. This has been removed and returns to sensible default of the preset which is to figure out the file type from the extensions. This change might affect generated output however so it is marked as breaking.
48
+
49
49
- Fixed RC version detection during installation. [PR312](https://github.com/shakacode/shakapacker/pull/312) by [ahangarha](https://github.com/ahangarha)
50
50
- Fix addition of webpack-dev-server to devDependencies during installation. [PR310](https://github.com/shakacode/shakapacker/pull/310) by [ahangarha](https://github.com/ahangarha)
51
-
52
51
### Removed
53
52
- Remove redundant enhancement for precompile task to run `yarn install`[PR 270](https://github.com/shakacode/shakapacker/pull/270) by [ahangarha](https://github.com/ahangarha).
54
53
- Remove deprecated `check_yarn_integrity` from `Shakapacker::Configuration`[PR SP288](https://github.com/shakacode/shakapacker/pull/288) by [ahangarha](https://github.com/ahangarha).
55
54
56
-
### Added
57
-
- All standard Webpack entries with the camelCase format are now supported in `shakapacker.yml` in snake_case format. [PR276](https://github.com/shakacode/shakapacker/pull/276) by [ahangarha](https://github.com/ahangarha).
58
-
- The `shakapacker:install` rake task now has an option to force overriding files using `FORCE=true` environment variable [PR311](https://github.com/shakacode/shakapacker/pull/311) by [ahangarha](https://github.com/ahangarha).
59
-
60
55
## [v6.6.0] - March 7, 2023
61
56
### Improved
62
57
- Allow configuration of webpacker.yml through env variable. [PR 254](https://github.com/shakacode/shakapacker/pull/254) by [alecslupu](https://github.com/alecslupu).
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+47-13Lines changed: 47 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,60 @@
1
+
# Contributing Guidelines
2
+
3
+
Thank you for your interest in contributing to Shakapacker! We welcome all contributions that align with our project goals and values. To ensure a smooth and productive collaboration, please follow these guidelines.
-[Setting Up a Development Environment](#setting-up-a-development-environment)
3
9
-[Making sure your changes pass all tests](#making-sure-your-changes-pass-all-tests)
4
10
-[Testing the generator](#testing-the-generator)
5
-
-[Find existing issues](#find-existing-issues)
6
11
7
-
---
8
-
## Setting Up a Development Environment
12
+
## Reporting Issues
13
+
If you encounter any issues with the project, please first check the exisiting issues (including closed ones). If the issues is not reported before, please opening an issue on our GitHub repository. Please provide a clear and detailed description of the issue, including steps to reproduce it. Creating a demo repository to demonstrate the issue would be ideal (and in some cases necessary).
9
14
10
-
1. Install [Yarn](https://yarnpkg.com/)
15
+
If looking to contribute to the project by fixing existing issues, we recommend looking at issues, particularly with the "[help wanted](https://github.com/shakacode/shakapacker/issues?q=is%3Aissue+label%3A%22help+wanted%22)" label.
11
16
12
-
2. Run the following commands to set up the development environment.
17
+
## Submitting Pull Requests
18
+
We welcome pull requests that fix bugs, add new features, or improve existing ones. Before submitting a pull request, please make sure to:
13
19
14
-
```
15
-
bundle install
16
-
yarn
17
-
```
20
+
- Open an issue about what you want to propose before start working on.
21
+
- Fork the repository and create a new branch for your changes.
22
+
- Write clear and concise commit messages.
23
+
- Follow our code style guidelines.
24
+
- Write tests for your changes and [make sure all tests pass](#making-sure-your-changes-pass-all-tests).
25
+
- Update the documentation as needed.
26
+
- Update CHANGELOG.md if the changes affect public behavior of the project.
27
+
28
+
---
29
+
## Setting Up a Development Environment
30
+
31
+
1. Install [Yarn](https://classic.yarnpkg.com/)
32
+
2. To test your changes on a Rails test project do the following steps:
33
+
- For Ruby gem, update `Gemfile` and point the `shakapacker` to the locally developing Shakapacker project:
-For npm package, use `yalc` with following steps:
38
+
```bash
39
+
# In Shakapacker root directory
40
+
yalc publish
41
+
# In Rails app for testing
42
+
yalc link shakapacker
43
+
44
+
# After every chagnes in shakapacker, run the folloing in Shakapacker directory
45
+
yalc push # or yalc publish --push
46
+
```
47
+
3. Run the following commands to set up the development environment.
48
+
```
49
+
bundle install
50
+
yarn install
51
+
```
18
52
19
53
## Making sure your changes pass all tests
20
54
21
-
There are a number of automated checks which run on GitHub Actions when a pull request is created.
55
+
There are several specs, covering different aspects of Shakapacker gem. You may run them locally or rely on GitHub CI actions configured to test the gem functionality if different Ruby, Rails, and Node environment.
22
56
23
-
You can run those checks on your own locally to make sure that your changes would not break the CI build.
57
+
We request running tests locally to ensure the new changes would not break the CI build.
24
58
25
59
### 1. Check the code for JavaScript style violations
26
60
@@ -46,6 +80,8 @@ yarn test
46
80
bundle exec rake test
47
81
```
48
82
83
+
Note: For this, you need `yalc` to be installed on your local machine
84
+
49
85
#### 4.1 Run a single ruby test file
50
86
51
87
```
@@ -90,5 +126,3 @@ To ensure that your installer works as expected, either you can run `bundle exec
90
126
91
127
**Note:** Ensure that you use bundle exec otherwise the installed shakapacker gem will run and not the one you are working on.
92
128
93
-
## Find existing issues
94
-
You may look at the issues list to find existing known issues to be addressed. In this, we recommend looking at closed issues, particularly with the "[help wanted](https://github.com/shakacode/shakapacker/issues?q=is%3Aissue+label%3A%22help+wanted%22+is%3Aclosed+)" label.
0 commit comments