-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0a28d43
Showing
132 changed files
with
47,860 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[version] | ||
0.225.1 | ||
|
||
[ignore] | ||
.*/malformed_package_json/.* | ||
<PROJECT_ROOT>/.*/__tests__/.* | ||
<PROJECT_ROOT>/packages/react-strict-dom/dist/dom.www.js.flow | ||
|
||
[include] | ||
|
||
[libs] | ||
flow-typed | ||
|
||
[options] | ||
module.name_mapper='^react-strict-dom$' -> '<PROJECT_ROOT>/packages/react-strict-dom/dist/native.js.flow' | ||
module.system.node.resolve_dirname=flow_modules | ||
module.system.node.resolve_dirname=node_modules | ||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
|
||
[strict] | ||
nonstrict-import | ||
sketchy-null | ||
unclear-type | ||
untyped-import | ||
untyped-type-import |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
This Code of Conduct also applies outside the project spaces when there is a | ||
reasonable belief that an individual's behavior may have a negative impact on | ||
the project or its community. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at <[email protected]>. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Bug report | ||
description: File a bug report | ||
labels: ["bug"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Describe the issue | ||
description: Please provide a concise description of what you're experiencing. Providing screenshots is also helpful. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Expected behavior | ||
description: Please provide a concise description of what you expected to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce | ||
description: Please describe the precise steps needed to reproduce the behavior. | ||
placeholder: | | ||
Mention package versions and environment (platform, browser, etc)... | ||
1. ... | ||
2. ... | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: Test case | ||
description: Please provide a link to a reduced test case that reproduces the issue. | ||
placeholder: "https://codesandbox.io/s/6lx6ql1w5r" | ||
validations: | ||
required: false | ||
- type: textarea | ||
attributes: | ||
label: Additional comments | ||
description: You're welcome to provide additional context and proposed solutions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Feature request | ||
description: If you have a suggestion… | ||
labels: ["enhancement"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Describe the feature request | ||
description: Please provide a concise description of the request, potential solutions, and additional context. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Configuration for Label Actions - https://github.com/marketplace/actions/label-actions | ||
|
||
"needs: issue template": | ||
comment: > | ||
<strong>:warning: This issue is missing required fields</strong>. To avoid this issue being closed, please provide the required information as described in the <a href="https://github.com/facebook/react-strict-dom/blob/main/.github/ISSUE_TEMPLATE/bug.yml">ISSUE TEMPLATE</a>. | ||
"resolution: no response": | ||
comment: > | ||
This issue is being closed because the requested information has not been provided. | ||
close: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: labels | ||
|
||
on: | ||
issues: | ||
types: [labeled, unlabeled] | ||
pull_request: | ||
types: [labeled, unlabeled] | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
label-actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dessant/label-actions@v3 | ||
with: | ||
config-path: .github/labels.yml | ||
github-token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: performance | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
compressed-size: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: necolas/compressed-size-action@master | ||
with: | ||
name: "runtime library" | ||
build-script: "build" | ||
pattern: "./packages/react-strict-dom/dist/{dom.js,native.js}" | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: react@next integration | ||
|
||
on: | ||
schedule: | ||
# Run every Monday at 12:00 (see https://crontab.guru) | ||
- cron: '0 12 * * 1' | ||
|
||
jobs: | ||
react-next: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- run: npm install | ||
- run: npm install --force --include-workspace-root --workspaces react@next react-dom@next react-native@nightly react-test-renderer@next | ||
# Run the unit tests | ||
- run: npm run jest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- run: npm install | ||
- run: npm run fmt:report | ||
|
||
type-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- run: npm install | ||
- run: npm run build | ||
- run: npm run flow | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- run: npm install | ||
- run: npm run lint:report | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- run: npm install | ||
- run: npm run build | ||
- run: npm run jest:report -- --runInBand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.cache | ||
.next | ||
build | ||
coverage | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Contributing | ||
|
||
## Reporting issues | ||
|
||
Before opening an issue, please search the issue tracker to make sure your issue hasn't already been reported. Please note that your issue may be closed if it doesn't include the information requested in the issue template. | ||
|
||
Meta has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue. | ||
|
||
## Getting started | ||
|
||
Visit the issue tracker to find a list of open issues that need attention. | ||
|
||
**Make sure you have npm@>=7 and node@>=0.16 installed.** | ||
|
||
First, clone your fork of the `react-strict-dom` repo: | ||
|
||
``` | ||
git clone https://github.com/your-username/react-strict-dom.git | ||
``` | ||
|
||
Then install the package dependencies | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
## Automated tests | ||
|
||
To run the linter: | ||
|
||
``` | ||
npm run lint | ||
``` | ||
|
||
To run flow (use `npm run build` first if you see errors in the examples app): | ||
|
||
``` | ||
npm run flow | ||
``` | ||
|
||
To run the unit tests: | ||
|
||
``` | ||
npm run jest | ||
``` | ||
|
||
…in watch mode: | ||
|
||
``` | ||
npm run jest -- --watch | ||
``` | ||
|
||
(NOTE: if you ever end up in a state where unit test snapshots differ between local and CI, run `npm run jest -- --clearCache`.) | ||
|
||
To run all these automated tests: | ||
|
||
``` | ||
npm run test | ||
``` | ||
|
||
## Development | ||
|
||
Build and automatically rebuild the library on changes: | ||
|
||
``` | ||
npm run dev -w react-strict-dom | ||
``` | ||
|
||
In another process, start the examples app: | ||
|
||
``` | ||
npm run dev -w examples | ||
``` | ||
|
||
### Simulator testing | ||
|
||
Launch the iOS simulator using XCode and then follow the Expo instructions to load the app in the simulator. | ||
|
||
### On device testing | ||
|
||
Install "Expo Go" on your device per [these instructions](https://reactnative.dev/docs/environment-setup?guide=quickstart#target-os-1). | ||
|
||
Scan the QR code with Expo Go to load the example app on your phone. | ||
|
||
## New Features | ||
|
||
Please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept. | ||
|
||
## Pull requests | ||
|
||
**Before submitting a pull request**, please make sure the following is done: | ||
|
||
1. Fork the repository and create your branch from `main`. | ||
2. If you've added code that should be tested, add tests! | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the tests pass (`npm run test`). | ||
|
||
You can now submit a pull request, referencing any issues it addresses. | ||
|
||
Please try to keep your pull request focused in scope and avoid including unrelated commits. | ||
|
||
After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements. | ||
|
||
Thank you for contributing! | ||
|
||
## Contributor License Agreement ("CLA") | ||
|
||
In order to accept your pull request, we need you to [complete and submit a CLA](https://code.facebook.com/cla). You only need to do this once to work on any of Meta's open source projects. | ||
|
||
## License | ||
|
||
By contributing to react-strict-dom, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree. |
Oops, something went wrong.