Skip to content

Commit

Permalink
[deps] Deprecate < node 20, upgrade CI deps (#610)
Browse files Browse the repository at this point in the history
* [github] Upgrade v3 to v4 as v3 is deprecated for old actions

* [deps] Update pnpm, node versions to newest minor version

* [deps] Override cross spawn

Overriding cross-spawn to >= 7.0.5 as per pnpm audit

* [deps] Only specify PNPM engine in one place
  • Loading branch information
gregnazario authored Jan 9, 2025
1 parent e2c91c5 commit f956fdd
Show file tree
Hide file tree
Showing 17 changed files with 233 additions and 101 deletions.
4 changes: 1 addition & 3 deletions .github/actions/run-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ runs:
using: composite
steps:
# Install node and pnpm.
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
with:
version: 8.9.0

# Run package install and build
- run: pnpm install --frozen-lockfile && pnpm build
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/run-check-version/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ runs:
using: composite
steps:
# Install node and pnpm.
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
with:
version: 8.9.0

# Run version check
- run: pnpm check-version
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/run-examples/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ runs:
using: composite
steps:
# Install node and pnpm.
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
with:
version: 8.9.0

# Run package install. If install fails, it probably means the updated lockfile was
# not included in the commit.
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/run-fmt/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ runs:
using: composite
steps:
# Install node and pnpm.
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
with:
version: 8.9.0

# Verify that the format is correct
- run: pnpm install --frozen-lockfile && pnpm _fmt --check
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/run-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ runs:
using: composite
steps:
# Install node and pnpm.
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
with:
version: 8.9.0

# Run eslint
- run: pnpm install --frozen-lockfile && pnpm lint
Expand Down
4 changes: 1 addition & 3 deletions .github/actions/run-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ runs:
using: composite
steps:
# Install node and pnpm.
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
with:
version: 8.9.0

# Run package install. If install fails, it probably means the updated lockfile was
# not included in the commit.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_SHA }}
- uses: ./.github/actions/run-build
2 changes: 1 addition & 1 deletion .github/workflows/run-check-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_SHA }}
- uses: ./.github/actions/run-check-version
2 changes: 1 addition & 1 deletion .github/workflows/run-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_SHA }}
- uses: ./.github/actions/run-examples
2 changes: 1 addition & 1 deletion .github/workflows/run-fmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_SHA }}
- uses: ./.github/actions/run-fmt
2 changes: 1 addition & 1 deletion .github/workflows/run-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_SHA }}
- uses: ./.github/actions/run-lint
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_SHA }}
- uses: ./.github/actions/run-tests
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.11.0
v22.12.0
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm 8.15.1
nodejs 22.12.0
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to the Aptos TypeScript SDK will be captured in this file. T

# Unreleased

- node now no longer supports older than v20
- overriding cross spawn for patch
- Add `AccountUtils` class to help with account serialization and deserialization
- Add `SingleKeySigner` interface which adds the ability to get the `AnyPublicKey` from a `SingleKeyAccount`
- We now throw an error earlier when you try to use the faucet with testnet or mainnet, rather than letting the call happen and then fail later.
Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@aptos-labs/ts-sdk",
"description": "Aptos TypeScript SDK",
"packageManager": "pnpm@8.9.0",
"packageManager": "pnpm@8.15.1",
"license": "Apache-2.0",
"engines": {
"node": ">=11.0.0"
"node": ">=20.0.0"
},
"bugs": {
"url": "https://github.com/aptos-labs/aptos-ts-sdk/issues/new/choose"
Expand Down Expand Up @@ -96,5 +96,10 @@
"typedoc-plugin-missing-exports": "^3.0.0",
"typescript": "^5.6.2"
},
"pnpm": {
"overrides": {
"cross-spawn": ">=7.0.5"
}
},
"version": "1.33.1"
}
}
Loading

0 comments on commit f956fdd

Please sign in to comment.