Skip to content

Commit 9419ac1

Browse files
authored
docs: bun updates, fix postinstall (#431)
1 parent 995b48c commit 9419ac1

File tree

11 files changed

+58
-124
lines changed

11 files changed

+58
-124
lines changed

.github/workflows/build-android.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
3737
- uses: oven-sh/setup-bun@v2
3838
with:
39-
bun-version: 1.1.22
39+
bun-version: 1.1.26
4040

4141
- name: Setup JDK
4242
uses: actions/setup-java@v4

.github/workflows/build-ios.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- uses: oven-sh/setup-bun@v2
3131
with:
32-
bun-version: 1.1.22
32+
bun-version: 1.1.26
3333

3434
- name: Bootstrap JS
3535
run: |

.github/workflows/validate-android.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- uses: oven-sh/setup-bun@v2
2525
with:
26-
bun-version: 1.1.22
26+
bun-version: 1.1.26
2727

2828
- name: Setup JDK
2929
uses: actions/setup-java@v4

.github/workflows/validate-js.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- uses: oven-sh/setup-bun@v2
4141
with:
42-
bun-version: 1.1.22
42+
bun-version: 1.1.26
4343

4444
- name: Install reviewdog
4545
uses: reviewdog/action-setup@v1
@@ -62,7 +62,7 @@ jobs:
6262

6363
- uses: oven-sh/setup-bun@v2
6464
with:
65-
bun-version: 1.1.22
65+
bun-version: 1.1.26
6666

6767
- name: Bootstrap JS
6868
run: |

CODE_OF_CONDUCT.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,42 @@ Project maintainers who do not follow or enforce the Code of Conduct in good
6565
faith may face temporary or permanent repercussions as determined by other
6666
members of the project's leadership.
6767

68+
### Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
71+
72+
#### 1. Correction
73+
74+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
75+
76+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
77+
78+
#### 2. Warning
79+
80+
**Community Impact**: A violation through a single incident or series of actions.
81+
82+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
83+
84+
#### 3. Temporary Ban
85+
86+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
87+
88+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
89+
90+
#### 4. Permanent Ban
91+
92+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
93+
94+
**Consequence**: A permanent ban from any sort of public interaction within the community.
95+
6896
## Attribution
6997

7098
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
7199
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72100

73101
[homepage]: https://www.contributor-covenant.org
74102

103+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
104+
75105
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
106+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

+14-113
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,39 @@ We want this community to be friendly and respectful to each other. Please follo
44

55
## Development workflow
66

7-
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
7+
To get started with the project, run `bun install` in the root directory to install the required dependencies for each package:
88

99
```sh
10-
yarn
10+
bun i
1111
```
1212

13-
> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.
13+
> While it's possible to use [`npm`](https://github.com/npm/cli), [`yarn`](https://classic.yarnpkg.com/), or [`pnpm`](https://pnpm.io), the tooling is built around [`bun`](https://bun.sh), so you'll have an easier time if you use `bun` for development.
1414
1515
While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.
1616

1717
To start the packager:
1818

1919
```sh
20-
yarn example start
21-
```
22-
23-
To run the example app on Android:
24-
25-
```sh
26-
yarn example android
27-
```
28-
29-
To run the example app on iOS:
30-
31-
```sh
32-
yarn example ios
20+
bun example
3321
```
3422

3523
Make sure your code passes TypeScript and ESLint. Run the following to verify:
3624

3725
```sh
38-
yarn typescript
39-
yarn lint
26+
bun tsx
27+
bun lint
4028
```
4129

4230
To fix formatting errors, run the following:
4331

4432
```sh
45-
yarn lint --fix
33+
bun lint-fix
4634
```
4735

4836
Remember to add tests for your change if possible. Run the unit tests by:
4937

5038
```sh
51-
yarn test
39+
bun test
5240
```
5341

5442
To edit the Objective-C files, open `example/ios/QuickCryptoExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-quick-crypto`.
@@ -81,20 +69,18 @@ We use [release-it](https://github.com/release-it/release-it) to make it easier
8169
To publish new versions, run the following:
8270

8371
```sh
84-
yarn release
72+
bun release
8573
```
8674

8775
### Scripts
8876

8977
The `package.json` file contains various scripts for common tasks:
9078

91-
- `yarn bootstrap`: setup project by installing all dependencies and pods.
92-
- `yarn typescript`: type-check files with TypeScript.
93-
- `yarn lint`: lint files with ESLint.
94-
- `yarn test`: run unit tests with Jest.
95-
- `yarn example start`: start the Metro server for the example app.
96-
- `yarn example android`: run the example app on Android.
97-
- `yarn example ios`: run the example app on iOS.
79+
- `bun bootstrap`: setup project by installing all dependencies and pods.
80+
- `bun tsc`: type-check files with TypeScript.
81+
- `bun lint`: lint files with ESLint.
82+
- `bun test`: run unit tests with Jest.
83+
- `bun example`: start the Metro server for the example app.
9884

9985
### Sending a pull request
10086

@@ -107,88 +93,3 @@ When you're sending a pull request:
10793
- Review the documentation to make sure it looks good.
10894
- Follow the pull request template when opening a pull request.
10995
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
110-
111-
## Code of Conduct
112-
113-
### Our Pledge
114-
115-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible 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.
116-
117-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
118-
119-
### Our Standards
120-
121-
Examples of behavior that contributes to a positive environment for our community include:
122-
123-
- Demonstrating empathy and kindness toward other people
124-
- Being respectful of differing opinions, viewpoints, and experiences
125-
- Giving and gracefully accepting constructive feedback
126-
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
127-
- Focusing on what is best not just for us as individuals, but for the overall community
128-
129-
Examples of unacceptable behavior include:
130-
131-
- The use of sexualized language or imagery, and sexual attention or
132-
advances of any kind
133-
- Trolling, insulting or derogatory comments, and personal or political attacks
134-
- Public or private harassment
135-
- Publishing others' private information, such as a physical or email
136-
address, without their explicit permission
137-
- Other conduct which could reasonably be considered inappropriate in a
138-
professional setting
139-
140-
### Enforcement Responsibilities
141-
142-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
143-
144-
Community leaders 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, and will communicate reasons for moderation decisions when appropriate.
145-
146-
### Scope
147-
148-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
149-
150-
### Enforcement
151-
152-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
153-
154-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
155-
156-
### Enforcement Guidelines
157-
158-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
159-
160-
#### 1. Correction
161-
162-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
163-
164-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
165-
166-
#### 2. Warning
167-
168-
**Community Impact**: A violation through a single incident or series of actions.
169-
170-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
171-
172-
#### 3. Temporary Ban
173-
174-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
175-
176-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
177-
178-
#### 4. Permanent Ban
179-
180-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
181-
182-
**Consequence**: A permanent ban from any sort of public interaction within the community.
183-
184-
### Attribution
185-
186-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
187-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
188-
189-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
190-
191-
[homepage]: https://www.contributor-covenant.org
192-
193-
For answers to common questions about this code of conduct, see the FAQ at
194-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

bun.lockb

0 Bytes
Binary file not shown.

example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PODS:
2929
- ReactCommon/turbomodule/core
3030
- Yoga
3131
- OpenSSL-Universal (3.2.2000)
32-
- QuickCrypto (1.0.0-rc.0):
32+
- QuickCrypto (1.0.0-beta.2):
3333
- DoubleConversion
3434
- glog
3535
- hermes-engine
@@ -1566,7 +1566,7 @@ SPEC CHECKSUMS:
15661566
hermes-engine: 8c1577f3fdb849cbe7729c2e7b5abc4b845e88f8
15671567
NitroModules: da051fe7d5765063eb128f5fa920e0e3aa5b09b6
15681568
OpenSSL-Universal: f8a9c4fdab7e21cb70bda471c269e86e9212439c
1569-
QuickCrypto: 66251dc3bae056eaf0bb5313cc078b94853d4da8
1569+
QuickCrypto: f7ee33fc626d3b924ef8314bead200e028370146
15701570
RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47
15711571
RCTDeprecation: 3afceddffa65aee666dafd6f0116f1d975db1584
15721572
RCTRequired: ec1239bc9d8bf63e10fb92bd8b26171a9258e0c1

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"bootstrap": "bun install && bun pods",
99
"tsc": "bun --filter=\"*\" typescript",
1010
"lint": "bun --filter=\"*\" lint",
11+
"lint-fix": "bun --filter=\"*\" lint-fix",
1112
"prepare": "bun --filter=\"react-native-quick-crypto\" prepare",
1213
"pre-release": "./scripts/prepare-release.sh",
1314
"release-git": "bun pre-release && release-it",
@@ -22,7 +23,7 @@
2223
"@release-it/bumper": "^6.0.1",
2324
"release-it": "^17.6.0"
2425
},
25-
"packageManager": "[email protected].22",
26+
"packageManager": "[email protected].26",
2627
"release-it": {
2728
"npm": {
2829
"publish": false

packages/react-native-quick-crypto/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"prepare": "bun clean && bob build",
3636
"release-it": "bun prepare && release-it",
3737
"test": "jest",
38-
"postinstall": "bun tsc"
38+
"postinstall": "tsc || exit 0;"
3939
},
4040
"keywords": [
4141
"react-native",

packages/react-native-quick-crypto/test/hashnames.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { HashContext, normalizeHashName } from '../src/Hashnames';
1+
// TODO: fix this test when we have a hashnames.ts file
2+
// i.e. after porting to nitro/new architecture
3+
import { HashContext, normalizeHashName } from '../src/utils/hashnames';
24

35
test('normalizeHashName happy', () => {
46
expect(normalizeHashName('SHA-1')).toBe('sha1');

0 commit comments

Comments
 (0)