diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 2f31ba2a..3fa9edcf 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -36,7 +36,7 @@ jobs: - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.1.22 + bun-version: 1.1.26 - name: Setup JDK uses: actions/setup-java@v4 diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 3fa50825..c401d996 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -29,7 +29,7 @@ jobs: - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.1.22 + bun-version: 1.1.26 - name: Bootstrap JS run: | diff --git a/.github/workflows/validate-android.yml b/.github/workflows/validate-android.yml index b2fb4014..2e196e05 100644 --- a/.github/workflows/validate-android.yml +++ b/.github/workflows/validate-android.yml @@ -23,7 +23,7 @@ jobs: - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.1.22 + bun-version: 1.1.26 - name: Setup JDK uses: actions/setup-java@v4 diff --git a/.github/workflows/validate-js.yml b/.github/workflows/validate-js.yml index ec5c3844..bba4aeca 100644 --- a/.github/workflows/validate-js.yml +++ b/.github/workflows/validate-js.yml @@ -39,7 +39,7 @@ jobs: - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.1.22 + bun-version: 1.1.26 - name: Install reviewdog uses: reviewdog/action-setup@v1 @@ -62,7 +62,7 @@ jobs: - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.1.22 + bun-version: 1.1.26 - name: Bootstrap JS run: | diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 96b64bce..68e001bd 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -65,6 +65,34 @@ 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. +### Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +#### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**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. + +#### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**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. + +#### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**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. + +#### 4. Permanent Ban + +**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. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, @@ -72,5 +100,7 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht [homepage]: https://www.contributor-covenant.org +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e69e2ab..9d5043da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,51 +4,39 @@ We want this community to be friendly and respectful to each other. Please follo ## Development workflow -To get started with the project, run `yarn` in the root directory to install the required dependencies for each package: +To get started with the project, run `bun install` in the root directory to install the required dependencies for each package: ```sh -yarn +bun i ``` -> 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. +> 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. 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. To start the packager: ```sh -yarn example start -``` - -To run the example app on Android: - -```sh -yarn example android -``` - -To run the example app on iOS: - -```sh -yarn example ios +bun example ``` Make sure your code passes TypeScript and ESLint. Run the following to verify: ```sh -yarn typescript -yarn lint +bun tsx +bun lint ``` To fix formatting errors, run the following: ```sh -yarn lint --fix +bun lint-fix ``` Remember to add tests for your change if possible. Run the unit tests by: ```sh -yarn test +bun test ``` 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 To publish new versions, run the following: ```sh -yarn release +bun release ``` ### Scripts The `package.json` file contains various scripts for common tasks: -- `yarn bootstrap`: setup project by installing all dependencies and pods. -- `yarn typescript`: type-check files with TypeScript. -- `yarn lint`: lint files with ESLint. -- `yarn test`: run unit tests with Jest. -- `yarn example start`: start the Metro server for the example app. -- `yarn example android`: run the example app on Android. -- `yarn example ios`: run the example app on iOS. +- `bun bootstrap`: setup project by installing all dependencies and pods. +- `bun tsc`: type-check files with TypeScript. +- `bun lint`: lint files with ESLint. +- `bun test`: run unit tests with Jest. +- `bun example`: start the Metro server for the example app. ### Sending a pull request @@ -107,88 +93,3 @@ When you're sending a pull request: - Review the documentation to make sure it looks good. - Follow the pull request template when opening a pull request. - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue. - -## Code of Conduct - -### Our Pledge - -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. - -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. - -### Our Standards - -Examples of behavior that contributes to a positive environment for our community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -- Focusing on what is best not just for us as individuals, but for the overall community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or - advances of any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email - address, without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -### Enforcement Responsibilities - -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. - -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. - -### Scope - -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. - -### Enforcement - -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. - -All community leaders are obligated to respect the privacy and security of the reporter of any incident. - -### Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: - -#### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. - -**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. - -#### 2. Warning - -**Community Impact**: A violation through a single incident or series of actions. - -**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. - -#### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. - -**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. - -#### 4. Permanent Ban - -**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. - -**Consequence**: A permanent ban from any sort of public interaction within the community. - -### Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, -available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/bun.lockb b/bun.lockb index 5ff5f3fc..06fd958a 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index f6a3a00d..f051bac7 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -29,7 +29,7 @@ PODS: - ReactCommon/turbomodule/core - Yoga - OpenSSL-Universal (3.2.2000) - - QuickCrypto (1.0.0-rc.0): + - QuickCrypto (1.0.0-beta.2): - DoubleConversion - glog - hermes-engine @@ -1566,7 +1566,7 @@ SPEC CHECKSUMS: hermes-engine: 8c1577f3fdb849cbe7729c2e7b5abc4b845e88f8 NitroModules: da051fe7d5765063eb128f5fa920e0e3aa5b09b6 OpenSSL-Universal: f8a9c4fdab7e21cb70bda471c269e86e9212439c - QuickCrypto: 66251dc3bae056eaf0bb5313cc078b94853d4da8 + QuickCrypto: f7ee33fc626d3b924ef8314bead200e028370146 RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47 RCTDeprecation: 3afceddffa65aee666dafd6f0116f1d975db1584 RCTRequired: ec1239bc9d8bf63e10fb92bd8b26171a9258e0c1 diff --git a/package.json b/package.json index 328e169c..5f306482 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "bootstrap": "bun install && bun pods", "tsc": "bun --filter=\"*\" typescript", "lint": "bun --filter=\"*\" lint", + "lint-fix": "bun --filter=\"*\" lint-fix", "prepare": "bun --filter=\"react-native-quick-crypto\" prepare", "pre-release": "./scripts/prepare-release.sh", "release-git": "bun pre-release && release-it", @@ -22,7 +23,7 @@ "@release-it/bumper": "^6.0.1", "release-it": "^17.6.0" }, - "packageManager": "bun@1.1.22", + "packageManager": "bun@1.1.26", "release-it": { "npm": { "publish": false diff --git a/packages/react-native-quick-crypto/package.json b/packages/react-native-quick-crypto/package.json index 43f19e40..d285002b 100644 --- a/packages/react-native-quick-crypto/package.json +++ b/packages/react-native-quick-crypto/package.json @@ -35,7 +35,7 @@ "prepare": "bun clean && bob build", "release-it": "bun prepare && release-it", "test": "jest", - "postinstall": "bun tsc" + "postinstall": "tsc || exit 0;" }, "keywords": [ "react-native", diff --git a/packages/react-native-quick-crypto/test/hashnames.test.ts b/packages/react-native-quick-crypto/test/hashnames.test.ts index ea7617d8..0886e75b 100644 --- a/packages/react-native-quick-crypto/test/hashnames.test.ts +++ b/packages/react-native-quick-crypto/test/hashnames.test.ts @@ -1,4 +1,6 @@ -import { HashContext, normalizeHashName } from '../src/Hashnames'; +// TODO: fix this test when we have a hashnames.ts file +// i.e. after porting to nitro/new architecture +import { HashContext, normalizeHashName } from '../src/utils/hashnames'; test('normalizeHashName happy', () => { expect(normalizeHashName('SHA-1')).toBe('sha1');