-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize with module template (Feb 2024)
- **BREAKING:** Drop support for Node 16; use Node 18 as minimum version - Use Node LTS for development rather than 18 - Use `tsup` to generate ESM-compatible builds (configuration copied from the module template) - Upgrade Yarn from v2 to v3.2.1 - Add Yarn constraints - Replace ESLint config file with module template version - Doing so re-enabled the `id-denylist` rule; this PR fixes any lint associated violations - Bump `prettier-plugin-packagejson` from ^2.2.17 to ^2.3.0 - Bump Jest from v26 to v28 - Add `jest-it-up` and run it after running tests - Use Babel for Jest coverage reports instead of v8 - This ended up dropping the coverage thresholds - Add `typedoc` - Add `auto-changelog` and validate changelogs as a part of linting - Bump `@metamask/utils` to ^8.3.0 - This forced a bump to the following packages in order to align JSON types: - Bump `@metamask/json-rpc-engine` from ^7.1.1 to ^7.3.2 - Bump `@metamask/eth-json-rpc-provider` from ^2.1.0 to ^2.3.2 - Add configuration for Dependabot - Add pull request template - Upgrade GitHub workflows - Upgrade `actions/checkout` from v2 to v3 - Upgrade `actions/setup-node` from v2 to v3 - Upgrade `MetaMask/action-create-release-pr` from v1 to v3 - Publish package to NPM - Publish API documentation for release candidates and releases - Notify metamask-npm-publishers of new releases in Slack
- Loading branch information
Showing
35 changed files
with
8,951 additions
and
4,898 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,15 @@ | ||
{ | ||
"ignores": [ | ||
"@lavamoat/allow-scripts", | ||
"@lavamoat/preinstall-always-fail", | ||
"@metamask/auto-changelog", | ||
"@types/*", | ||
"@yarnpkg/cli", | ||
"@yarnpkg/core", | ||
"@yarnpkg/fslib", | ||
"clipanion", | ||
"prettier-plugin-packagejson", | ||
"ts-node", | ||
"typedoc" | ||
] | ||
} |
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
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
* text=auto | ||
|
||
yarn.lock linguist-generated=false | ||
|
||
# yarn v3 | ||
# See: https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored | ||
/.yarn/releases/** binary | ||
/.yarn/plugins/** binary |
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Lines starting with '#' are comments. | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
* @MetaMask/shared-libraries-engineers | ||
* @MetaMask/shared-libraries-engineers |
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 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' | ||
time: '06:00' | ||
allow: | ||
- dependency-name: '@metamask/*' | ||
target-branch: 'main' | ||
versioning-strategy: 'increase-if-necessary' | ||
open-pull-requests-limit: 10 |
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,11 @@ | ||
<!-- | ||
Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: | ||
* What is the current state of things and why does it need to change? | ||
* What is the solution your changes offer and how does it work? | ||
Are there any issues or other links reviewers should consult to understand this pull request better? For instance: | ||
* Fixes #12345 | ||
* See: #67890 | ||
--> |
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,119 @@ | ||
name: Build, Lint, and Test | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- name: Install Yarn dependencies | ||
run: yarn --immutable | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: | ||
- prepare | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn --immutable --immutable-cache | ||
- run: yarn build | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
needs: | ||
- prepare | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
- run: yarn --immutable --immutable-cache | ||
- run: yarn lint | ||
- name: Validate RC changelog | ||
if: ${{ startsWith(github.head_ref, 'release/') }} | ||
run: yarn lint:changelog --rc | ||
- name: Validate changelog | ||
if: ${{ !startsWith(github.head_ref, 'release/') }} | ||
run: yarn lint:changelog | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
needs: | ||
- prepare | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- run: yarn --immutable --immutable-cache | ||
- run: yarn test | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi | ||
compatibility-test: | ||
name: Compatibility test | ||
runs-on: ubuntu-latest | ||
needs: | ||
- prepare | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn | ||
- run: yarn test | ||
- name: Require clean working directory | ||
shell: bash | ||
run: | | ||
git restore yarn.lock | ||
if ! git diff --exit-code; then | ||
echo "Working tree dirty at end of job" | ||
exit 1 | ||
fi |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.