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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+36-36
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
3
3
We want to encourage the developer community to contribute to Lightning Web Components. This guide has instructions to install, build, test and contribute to the framework.
4
4
5
-
-[Requirements](#requirements)
6
-
-[Installation](#installation)
7
-
-[Building LWC](#building-lwc)
8
-
-[Testing](#testing)
9
-
-[Git Workflow](#git-workflow)
5
+
-[Requirements](#requirements)
6
+
-[Installation](#installation)
7
+
-[Building LWC](#building-lwc)
8
+
-[Testing](#testing)
9
+
-[Git Workflow](#git-workflow)
10
10
11
11
Before you start, familiarize yourself with [Lightning Web Components](https://lwc.dev/guide/introduction).
12
12
13
13
## Requirements
14
14
15
-
-[Node](https://nodejs.org/)
16
-
-[Yarn](https://yarnpkg.com/)
15
+
-[Node](https://nodejs.org/)
16
+
-[Yarn](https://yarnpkg.com/)
17
17
18
18
This project uses [Volta](https://volta.sh/) to ensure that all the contributors share the same version of `Node` and `Yarn` for development. If you are considering making frequent contributions to this project, we recommend installing this tool as well. Otherwise, check the `volta` field in `package.json` to see which versions to use.
19
19
@@ -94,8 +94,8 @@ Test fixtures are file-based tests that are executed using a helper called [`tes
94
94
95
95
When developing LWC, use integration testing to ensure functionality is correctly reflected in the browser. This repo has two integration test suites.
96
96
97
-
-@lwc/integration-karma: Contains all integration tests that can run with javascript only. For information about usage and contribution, refer to this [documentation][integration-karma-readme].
98
-
-@lwc/integration-tests: Contains all other integration tests that require web driver API support (e.g., focus, keyboard navigation). For information about usage and contribution, refer to this [documentation][integration-test-readme].
97
+
-@lwc/integration-karma: Contains all integration tests that can run with javascript only. For information about usage and contribution, refer to this [documentation][integration-karma-readme].
98
+
-@lwc/integration-tests: Contains all other integration tests that require web driver API support (e.g., focus, keyboard navigation). For information about usage and contribution, refer to this [documentation][integration-test-readme].
99
99
100
100
To run the Karma tests from the root:
101
101
@@ -132,7 +132,7 @@ This will check that the minified bundle sizes don't exceed our thresholds. Our
132
132
133
133
LWC relies on type annotations.
134
134
135
-
-Make sure your editor supports [typescript](https://www.typescriptlang.org/).
135
+
- Make sure your editor supports [typescript](https://www.typescriptlang.org/).
136
136
137
137
### ESLint
138
138
@@ -297,36 +297,36 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
297
297
298
298
Must be one of the following:
299
299
300
-
-**build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
301
-
-**chore**: Other changes that don't modify src or test files
302
-
-**ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
303
-
-**docs**: Documentation only changes
304
-
-**feat**: A new feature
305
-
-**fix**: A bug fix
306
-
-**perf**: A code change that improves performance
307
-
-**refactor**: A code change that neither fixes a bug nor adds a feature
308
-
-**revert**: Reverts a previous commit
309
-
-**style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
310
-
-**test**: Adding missing tests or correcting existing tests
300
+
-**build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
301
+
-**chore**: Other changes that don't modify src or test files
302
+
-**ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
303
+
-**docs**: Documentation only changes
304
+
-**feat**: A new feature
305
+
-**fix**: A bug fix
306
+
-**perf**: A code change that improves performance
307
+
-**refactor**: A code change that neither fixes a bug nor adds a feature
308
+
-**revert**: Reverts a previous commit
309
+
-**style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
310
+
-**test**: Adding missing tests or correcting existing tests
311
311
312
312
#### Commit Scope
313
313
314
314
The scope should be the name of the npm package affected, as perceived by the person reading the changelog.
315
315
316
316
There are currently a few exceptions to the "use package name" rule:
317
317
318
-
-**packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
319
-
-**changelog**: used for updating the release notes in CHANGELOG.md
320
-
-**lwc docs**: used for docs related changes within the lwc/docs directory of the repo
321
-
-none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
318
+
-**packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
319
+
-**changelog**: used for updating the release notes in CHANGELOG.md
320
+
-**lwc docs**: used for docs related changes within the lwc/docs directory of the repo
321
+
- none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
322
322
323
323
#### Commit Subject
324
324
325
325
The subject contains a succinct description of the change:
326
326
327
-
-use the imperative, present tense: "change" not "changed" nor "changes"
328
-
-don't capitalize first letter
329
-
-no dot (.) at the end
327
+
- use the imperative, present tense: "change" not "changed" nor "changes"
328
+
- don't capitalize first letter
329
+
- no dot (.) at the end
330
330
331
331
#### Commit Body
332
332
@@ -350,17 +350,17 @@ The footer should contain any information about **Breaking Changes** and is also
350
350
351
351
**Potential pitfalls:** When submitting changes to the LWC framework, there are several important considerations to keep in mind to ensure that your changes are reviewed & accepted.
352
352
353
-
-The LWC framework makes strong guarantees about backwards compatibility to those that use our framework. Any changes that compromise these guarantees are unlikely to be accepted as-is.
354
-
-If your change causes a test to fail in unit or integration tests, it is unlikely that your submission will be accepted as-is.
355
-
-Certain parts of the codebase are particularly susceptible to breaking changes. This includes the browser runtime (`engine-core` and `engine-dom`), as well as the compiler (`compiler`, `style-compiler`, `template-compiler`).
356
-
-Some areas of the codebase are less mature and undergoing active development. Areas related to SSR, including the server-side runtime (`engine-server`), fall under this category.
353
+
- The LWC framework makes strong guarantees about backwards compatibility to those that use our framework. Any changes that compromise these guarantees are unlikely to be accepted as-is.
354
+
- If your change causes a test to fail in unit or integration tests, it is unlikely that your submission will be accepted as-is.
355
+
- Certain parts of the codebase are particularly susceptible to breaking changes. This includes the browser runtime (`engine-core` and `engine-dom`), as well as the compiler (`compiler`, `style-compiler`, `template-compiler`).
356
+
- Some areas of the codebase are less mature and undergoing active development. Areas related to SSR, including the server-side runtime (`engine-server`), fall under this category.
357
357
358
358
**Definition of done:** Especially when making large changes to the codebase, certain complementary work must be undertaken for the desired changes to be considered. When making a submission please adhere to the following:
359
359
360
-
-All pre-existing unit- & integration- tests must pass.
361
-
-If you modify a pre-existing test to accommodate your changes, a thorough reasoning must be proactively provided in the PR.
362
-
-Test coverage should not decline – if you add code paths, add corresponding tests.
363
-
-If your tests have the potential to negatively impact performance, provide a before & after comparison of performance using the test collateral provided in the repo.
360
+
- All pre-existing unit- & integration- tests must pass.
361
+
- If you modify a pre-existing test to accommodate your changes, a thorough reasoning must be proactively provided in the PR.
362
+
- Test coverage should not decline – if you add code paths, add corresponding tests.
363
+
- If your tests have the potential to negatively impact performance, provide a before & after comparison of performance using the test collateral provided in the repo.
364
364
365
365
It's also worth noting that not all submissions will be accepted, even if all the above criteria are met. There may be constraints in the larger Salesforce ecosystem that prevent certain changes. If your submission is likely to change large parts of the codebase, please open an issue preemptively so that the design can be discussed.
-`name` (type: `string`, optional) - name of the component, e.g. `foo` in `x/foo`.
46
-
-`namespace` (type: `string`, optional) - namepace of the component, e.g. `x` in `x/foo`.
47
-
-`isExplicitImport` (type: `boolean`, optional) - true if this is an explicit import.
48
-
-`dynamicImports` (type: `object`, optional) - see below:
49
-
-`loader` (type: `string`, optional) - loader to use at runtime.
50
-
-`strictSpecifier` (type: `boolean`, optional) - true if a strict specifier should be used.
51
-
-`instrumentation` (type: `InstrumentationObject`, optional) - instrumentation object to gather metrics and non-error logs for internal use. See the `@lwc/errors` package for details on the interface.
52
-
-`apiVersion` (type: `number`, optional) - API version to associate with the compiled component.
45
+
-`name` (type: `string`, optional) - name of the component, e.g. `foo` in `x/foo`.
46
+
-`namespace` (type: `string`, optional) - namepace of the component, e.g. `x` in `x/foo`.
47
+
-`isExplicitImport` (type: `boolean`, optional) - true if this is an explicit import.
48
+
-`dynamicImports` (type: `object`, optional) - see below:
49
+
-`loader` (type: `string`, optional) - loader to use at runtime.
50
+
-`strictSpecifier` (type: `boolean`, optional) - true if a strict specifier should be used.
51
+
-`instrumentation` (type: `InstrumentationObject`, optional) - instrumentation object to gather metrics and non-error logs for internal use. See the `@lwc/errors` package for details on the interface.
52
+
-`apiVersion` (type: `number`, optional) - API version to associate with the compiled component.
0 commit comments