Skip to content

Commit b8af3cb

Browse files
feat: Open source react-context-registry
1 parent 2a3bd6b commit b8af3cb

26 files changed

+11023
-0
lines changed

.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 1 version
3+
not dead

.eslintrc.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true
5+
},
6+
extends: [
7+
'eslint:recommended',
8+
'plugin:react/recommended',
9+
'plugin:@typescript-eslint/recommended'
10+
],
11+
overrides: [],
12+
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
ecmaVersion: 'latest',
15+
sourceType: 'module'
16+
},
17+
plugins: ['react', '@typescript-eslint'],
18+
settings: {
19+
react: {
20+
version: 'detect'
21+
}
22+
},
23+
rules: {}
24+
};

.github/workflows/npm-publish.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: NPM Release and Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
8+
jobs:
9+
quality-bump-and-publish:
10+
runs-on: ubuntu-latest
11+
if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v3
15+
- name: Configure git
16+
run: |
17+
git config user.name "GitHub Actions Bot"
18+
git config user.email "[email protected]"
19+
- name: Install npm dependencies
20+
run: npm ci
21+
- name: Run quality checks
22+
run: npm run quality
23+
- name: Build project
24+
run: npm run build
25+
- name: Prevent husky from interfering with standard-version commit
26+
run: rm ./.git/hooks/prepare-commit-msg
27+
- name: Run standard-version to bump version
28+
run: npm run release
29+
- name: Push version bump to main
30+
uses: ad-m/github-push-action@master
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
branch: main
34+
tags: true
35+
force: true
36+
- name: Bundle tarball
37+
run: npm run package
38+
- name: Publish to npm
39+
run: npm publish
40+
env:
41+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.gitignore

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Created by https://www.gitignore.io/api/osx,node,linux
2+
3+
### Linux ###
4+
*~
5+
6+
# temporary files which can be created if a process still has a handle open of a deleted file
7+
.fuse_hidden*
8+
9+
# KDE directory preferences
10+
.directory
11+
12+
# Linux trash folder which might appear on any partition or disk
13+
.Trash-*
14+
15+
# .nfs files are created when an open file is removed but is still being accessed
16+
.nfs*
17+
18+
### Node ###
19+
# Logs
20+
logs
21+
*.log
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
# Runtime data
27+
pids
28+
*.pid
29+
*.seed
30+
*.pid.lock
31+
32+
# Directory for instrumented libs generated by jscoverage/JSCover
33+
lib-cov
34+
35+
# Coverage directory used by tools like istanbul
36+
coverage
37+
38+
# nyc test coverage
39+
.nyc_output
40+
41+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
42+
.grunt
43+
44+
# Bower dependency directory (https://bower.io/)
45+
bower_components
46+
47+
# node-waf configuration
48+
.lock-wscript
49+
50+
# Compiled binary addons (http://nodejs.org/api/addons.html)
51+
build/Release
52+
53+
# Dependency directories
54+
node_modules/
55+
jspm_packages/
56+
57+
# Typescript v1 declaration files
58+
typings/
59+
60+
# Optional npm cache directory
61+
.npm
62+
63+
# Optional eslint cache
64+
.eslintcache
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variables file
76+
.env
77+
78+
### OSX ###
79+
*.DS_Store
80+
.AppleDouble
81+
.LSOverride
82+
83+
# Icon must end with two \r
84+
Icon
85+
86+
# Thumbnails
87+
._*
88+
89+
# Files that might appear in the root of a volume
90+
.DocumentRevisions-V100
91+
.fseventsd
92+
.Spotlight-V100
93+
.TemporaryItems
94+
.Trashes
95+
.VolumeIcon.icns
96+
.com.apple.timemachine.donotpresent
97+
98+
# Directories potentially created on remote AFP share
99+
.AppleDB
100+
.AppleDesktop
101+
Network Trash Folder
102+
Temporary Items
103+
.apdisk
104+
105+
106+
# End of https://www.gitignore.io/api/osx,node,linux
107+
108+
dist/
109+
docs/
110+
build/
111+
stats/
112+
.jestcache
113+
.idea
114+
.vscode

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/fermium

.prettierignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package-lock.json
2+
dist/
3+
stats/
4+
build/
5+
coverage/
6+
.jestcache/
7+
node_modules/

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"tabWidth": 4,
5+
"arrowParens": "always",
6+
"trailingComma": "none"
7+
}

.versionrc.js

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
module.exports = {
2+
releaseCommitMessageFormat: 'chore(release): {{currentTag}} [ci-skip]',
3+
types: [
4+
{
5+
type: 'feature',
6+
hidden: false,
7+
section: 'Features'
8+
},
9+
{
10+
type: 'feat',
11+
hidden: false,
12+
section: 'Features'
13+
},
14+
{
15+
type: 'fix',
16+
hidden: false,
17+
section: 'Bug Fixes'
18+
},
19+
{
20+
type: 'build',
21+
hidden: false,
22+
section: 'Build System'
23+
},
24+
{
25+
type: 'chore',
26+
hidden: false,
27+
section: 'Miscellaneous Chores'
28+
},
29+
{
30+
type: 'ci',
31+
hidden: false,
32+
section: 'Continuous Integration'
33+
},
34+
{
35+
type: 'docs',
36+
hidden: false,
37+
section: 'Documentation'
38+
},
39+
{
40+
type: 'style',
41+
hidden: false,
42+
section: 'Styles'
43+
},
44+
{
45+
type: 'refactor',
46+
hidden: false,
47+
section: 'Code Refactoring'
48+
},
49+
{
50+
type: 'perf',
51+
hidden: false,
52+
section: 'Performance Improvements'
53+
},
54+
{
55+
type: 'test',
56+
hidden: false,
57+
section: 'Tests'
58+
},
59+
{
60+
type: 'revert',
61+
hidden: false,
62+
section: 'Reverts'
63+
}
64+
]
65+
};

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)