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
### eslint-plugin v5.2.0
#### Added
- feat: Start supporting new template data and syntax, as described in [#370](#370). Not added to the documentation yet, as it is still in beta testing phase.
- feat: Add setting `legacy-templates` to enable/disable the old template data and syntax. By default, it is enabled for backward compatibility. Not added to the documentation yet, as the new template data and syntax is still in beta testing phase.
- feat([#371](#371)): Publish eslint-plugin both to @boundaries/eslint-plugin and eslint-plugin-boundaries package names.
- feat: Add `cache` setting to enable/disable the new cache mechanism used to boost performance. By default, it is enabled. We recommend to keep it enabled unless you experience issues. In such case, please, open an issue describing the problem.
#### Changed
- feat: Improve performance in approximately 30% in large codebases by optimizing cache usage and reducing redundant computations when resolving elements and matching rules.
- refactor([#371](#371)): Extract element descriptors and matching logic to a separate module to improve code organization, readability and reusability.
- refactor: Overall performance improvements and code optimizations.
- feat: Add empty schema to rules without options to validate them correctly.
#### Fixed
- fix: Assign internalPaths correctly when in elements setting the mode is 'file' but the pattern matches folders, not files. Now it returns the correct internalPaths instead of the matched folder name.
- fix: Assign relationships correctly in dependencies. Now ancestor and nephew relationships are assigned correctly. Previously, all ancestors with a common parent were considered uncles.
### elements v1.1.0
#### Added
- feat: Implement cache for micromatch results, regex and captures to improve performance.
- feat: Add `cache` option to allow disabling the cache.
#### Changed
- refactor: Overall performance improvements and code optimizations.
#### Fixed
- fix: Fix cache performance issues by implementing custom string generation for well-known objects, and removing caching for keys based on complex objects to avoid performance degradation.
- fix: Legacy selectors being an array with only one element now correctly treated as a single string selector.
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@
3
3
# Table of Contents
4
4
5
5
-[Getting started](#getting-started)
6
-
-[package tasks](#package-tasks)
6
+
-[Contributing workflow](#contributing-workflow)
7
+
-[Package Tasks](#package-tasks)
7
8
-[Branching model](#branching-model)
8
9
-[Pull Request](#pull-request)
9
10
-[Release process](#release-process)
@@ -29,7 +30,19 @@ To get started, clone the repository and install the dependencies:
29
30
pnpm install
30
31
```
31
32
32
-
# Package tasks
33
+
# Contributing workflow
34
+
35
+
In short, the contributing workflow is as follows:
36
+
37
+
1. Create an RFC (if needed)
38
+
2. Create Issue(s) from RFC
39
+
3. Break Down into Sub-Issues (if needed)
40
+
4. Add to Project & Assign to Milestone
41
+
5. Contributors Pick Up Tasks
42
+
43
+
Read the full details in the [contributing workflow guide](../docs/contributing-workflow.md).
44
+
45
+
# Package Tasks
33
46
34
47
Package task names are standardized across the repository. This enables to define common dependencies and files impacting them in the root `nx.json` file. The following are the most common tasks:
35
48
@@ -38,20 +51,21 @@ Package task names are standardized across the repository. This enables to defin
38
51
*`check:spell`: Checks the spelling in the package.
39
52
*`build`: Builds the package.
40
53
*`test:unit`: Runs the unit tests.
54
+
*`test:mutation`: Runs the mutation tests.
41
55
*`test:e2e`: Runs the end-to-end tests.
42
56
*`check:all`: Run all the checks and build the package.
43
57
44
-
You can also rewrite the tasks to fit the package's needs. For example, if a package has special requirements for unit tests, you can define a `test:unit` task in the package's `project.json` file, redefining the Nx inputs, outputs, and dependencies in order to fit the package's needs and optimize the cache accordingly. _(See how the `eslint-plugin-boundaries` package does this for an example)_
58
+
You can also rewrite the tasks to fit the package's needs. For example, if a package has special requirements for unit tests, you can define a `test:unit` task in the package's `project.json` file, redefining the Nx inputs, outputs, and dependencies in order to fit the package's needs and optimize the cache accordingly. _(See how the `eslint-plugin` package does this for an example)_
45
59
46
60
> [!WARNING]
47
61
> It is crucial to configure properly the tasks dependencies, input, and output files, so __Nx can keep or clean the cache correctly, avoiding running unnecessary tasks__, both locally or in the pipeline.
48
62
49
63
## Running tasks in packages
50
64
51
-
Nx provides a way to run commands in a specific package, taking care of the task dependencies. To run a command in a package, use the following syntax: `pnpm nx run <task> <package>`. For example, to run the unit tests in the `eslint-plugin-boundaries` package, use the following command:
65
+
Nx provides a way to run commands in a specific package, taking care of the task dependencies. To run a command in a package, use the following syntax: `pnpm nx run <task> <package>`. For example, to run the unit tests in the `eslint-plugin` package, use the following command:
52
66
53
67
```bash
54
-
pnpm nx test:unit eslint-plugin-boundaries
68
+
pnpm nx test:unit eslint-plugin
55
69
```
56
70
57
71
> ![TIP]
@@ -86,7 +100,7 @@ Some important points to consider:
86
100
* It is long-lived because we also have bots that will open PRs. So, they can be configured to open PRs to the "release" branch, and their changes will also enter in the process of preparing the release, such as changes from any other contributor.
87
101
*__The "release" branch is the default branch for PRs.__ Only a project maintainer should open a PR to the "main" branch, and only when the release is ready to be published.
88
102
* Usually, feature branches should be short-lived, and they should be merged into the "release" branch as soon as possible. This way, the changes will be included in the next release, and the feature branch can be deleted.
89
-
* When necessary, a medium-lived branch can be created from the "release" branch to group changes that will be released together and require more time to be prepared. Once the changes are ready, the branch can be merged into the "release" branch.
103
+
* When necessary, a medium-lived branch can be created from the "release" branch to group changes that will be released together and require more time to be prepared, such as `release-<version>`. Once the changes are ready, the branch can be merged into the "release" branch.
90
104
* For publishing beta versions or fix versions of precedent releases, medium-lived branches should be also created from the "release" branch. A branch naming convention should be followed in order to identify these branches easily. For example:
91
105
*`release-X.Y.Z-beta.N`: For beta versions of the next release.
92
106
@@ -99,7 +113,7 @@ We use the __squash and merge strategy for merging PRs to the release branch__.
99
113
100
114
But we use the __merge commit strategy for merging PRs to the main branch from the release branch__. The reasons are:
101
115
102
-
* To keep in the history the information about the features that were merged separately into the release branch. This is very important, because we may have changes from different packages in the release branch. Squashing all the changes into a single commit would make it difficult to understand or revert the changes for a specific package.
116
+
* To keep in the history the information about the features that were merged separately into the release branch. This is very important, because we may have changes from different packages in the release branch, or from features that are not related. Squashing all the changes into a single commit would make it difficult to understand or revert the changes for a specific package or feature.
103
117
* To avoid having to rebase the release branch every time a PR is merged to the main branch.
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,18 @@ You can also provide an absolute path in the environment variable, but it may be
320
320
321
321
</details>
322
322
323
+
#### __`boundaries/cache`__
324
+
325
+
Enable or disable the cache mechanism used to boost performance. By default, it is enabled. We recommend to keep it enabled unless you experience issues. In such case, please, open an issue describing the problem.
326
+
327
+
```js
328
+
exportdefault [{
329
+
settings: {
330
+
"boundaries/cache":true// or false to disable the cache
331
+
}
332
+
}]
333
+
```
334
+
323
335
### Predefined configurations
324
336
325
337
The plugin is distributed with two different predefined configurations: "recommended" and "strict".
0 commit comments