Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/OS-854-sig…
Browse files Browse the repository at this point in the history
…nalling-proposal-filtering
  • Loading branch information
heueristik committed Nov 24, 2023
2 parents c286af2 + d56a1f3 commit 2e6c804
Show file tree
Hide file tree
Showing 51 changed files with 5,330 additions and 492 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 16.x
node-version: 18.x
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Generate Client Docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javascript_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: 16.x
node-version: 18.x
registry-url: https://registry.npmjs.org
- name: Install deps
run: yarn install --frozen-lockfile
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/javascript_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node: ['16.x']
node: ['16.x', '18.x', '20.x']
os: [ubuntu-latest]

steps:
Expand All @@ -48,6 +49,6 @@ jobs:
IPFS_API_KEY: ${{ secrets.IPFS_API_KEY }}

- name: Run unit tests
run: yarn test --testPathIgnorePatterns=modules/client/test/integration --ci --coverage --passWithNoTests
run: yarn test --testPathIgnorePatterns=modules/client/test/integration --coverage --passWithNoTests
env:
IPFS_API_KEY: ${{ secrets.IPFS_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/scan_vuln_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup NodeJS before scanning with Trivy
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: 'yarn'

- name: Install deps before scanning with Trivy
Expand Down
13 changes: 11 additions & 2 deletions modules/client-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,44 @@ TEMPLATE:

- Added `actions` to `SubgraphListItem` type

### Changed

- Replaces tsdx with dts-cli
- Upgrades typescript to v5

## [1.10.0]

### Added

- Add support for arbitrum network


## [1.9.0]

### Changed

- Subgraph version from 1.3.0 to 1.3.1

## [1.8.0]

### Added

- Add new class error `InvalidPermissionOperationType`

## [1.7.1]

### Fixed

- ENS name Regex

## [1.7.0]

### Added

- Add common schemas for validations
- Support for sepolia network
- Move functionality from `sdk-common` to `sdk-client-common`
- New error classes `InvalidVersionError`, `PluginUpdatePreparationError` and `ProposalNotFoundError`
- New error classes `InvalidVersionError`, `PluginUpdatePreparationError` and
`ProposalNotFoundError`
- Add `isSubdomain`, `isIpfsUri` and `isEnsName` functions
- Update SizeMismatchError error class

Expand Down
22 changes: 13 additions & 9 deletions modules/client-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
"node": ">=16"
},
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "TESTING=true tsdx test --verbose --runInBand",
"lint": "tsdx lint",
"prepare": "tsdx build",
"build": "yarn run clean && dts build",
"test": "TESTING=true dts test",
"lint": "dts lint",
"prepare": "yarn build",
"size": "size-limit",
"analyze": "size-limit --why",
"clean": "rm -Rf .turbo dist",
Expand Down Expand Up @@ -50,15 +49,17 @@
],
"devDependencies": {
"@size-limit/preset-small-lib": "^7.0.8",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jest": "^29.5.9",
"dts-cli": "^2.0.3",
"husky": "^7.0.4",
"size-limit": "^7.0.8",
"tsdx": "^0.14.1",
"tslib": "^2.3.1",
"typescript": "^4.6.2"
"tslib": "^2.6.2",
"typescript": "^5.2.2"
},
"dependencies": {
"@aragon/osx-ethers-v1.0.0": "npm:@aragon/[email protected]",
"@aragon/osx-ethers": "^1.3.0-rc0.4",
"@aragon/osx-ethers-v1.0.0": "npm:@aragon/[email protected]",
"@aragon/sdk-ipfs": "^1.1.0",
"@ethersproject/abstract-signer": "^5.5.0",
"@ethersproject/bignumber": "^5.6.0",
Expand All @@ -69,5 +70,8 @@
"graphql": "^16.5.0",
"graphql-request": "^4.3.0",
"yup": "^1.2.0"
},
"jest": {
"preset": "ts-jest"
}
}
1 change: 1 addition & 0 deletions modules/client-common/test/unit/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ describe("Context instances", () => {
it("Should create a context with the correct DAOFactory address from the core-contracts-package", () => {
contextParams.daoFactoryAddress = "";
contextParams.network = "matic";
contextParams.web3Providers = "https://polygon-rpc.com/";
const context = new TestContext(contextParams);

expect(context).toBeInstanceOf(TestContext);
Expand Down
4 changes: 2 additions & 2 deletions modules/client-common/test/unit/promises.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe("Test promise helpers", () => {
it("Should timeout", async () => {
const timeout = 100;
const promise = new Promise((resolve) =>
setTimeout(resolve, timeout * 2)
setTimeout(resolve, timeout * 2).unref()
);
await expect(promiseWithTimeout(promise, timeout)).rejects.toThrow(
"Time out",
Expand All @@ -51,7 +51,7 @@ describe("Test promise helpers", () => {
it("Should not timeout", async () => {
const timeout = 100;
const promise = new Promise((resolve) =>
setTimeout(resolve, timeout / 2)
setTimeout(resolve, timeout / 2).unref()
);
await expect(promiseWithTimeout(promise, timeout)).resolves
.toBeUndefined();
Expand Down
7 changes: 4 additions & 3 deletions modules/client-common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
"include": ["src", "types"],
"compilerOptions": {
"module": "esnext",
"lib": ["dom", "esnext"],
"target": "es6",
"target": "es2018",
"importHelpers": true,
// output .d.ts declaration files for consumers
"declaration": true,
"outDir": "./dist",
// output .js.map sourcemap files for consumers
"sourceMap": true,
// match output dir to input dir. e.g. dist/index instead of dist/src/index
Expand All @@ -33,5 +33,6 @@
// `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc`
"noEmit": true,
"resolveJsonModule": true
}
},
"include": ["src", "types"],
}
11 changes: 11 additions & 0 deletions modules/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ TEMPLATE:

### Added
- Add `isSignalling` to proposal list items and add support for signalling proposals.
- Fixed proposal id not being transformed


## [1.19.1]
Expand Down Expand Up @@ -56,6 +57,16 @@ TEMPLATE:
- Add `actions` to `TokenVotingProposalListItem`
- Add `actions` to `AddresslistVotingProposalListItem`

### Changed

- Replaces tsdx with dts-cli
- Upgrades typescript to v5
- Replaces ganache with hardhat

### Removed

- Removed `restoreBlockTime()` test helper function

## [1.18.2]
### Fixed

Expand Down
21 changes: 21 additions & 0 deletions modules/client/hardhat.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require('@nomiclabs/hardhat-ethers');
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: '0.8.19',
networks: {
hardhat: {
forking: {
url: 'https://example.com',
blockNumber: 1,
// Disables forking for tests but necessary for the test-enviornment to function because of a dependency
enabled: false,
},
chainId: 31337,
// necessary to deploy osx 1.2.1 in hardhat node
allowUnlimitedContractSize: true,
accounts: {
count: 3,
},
},
},
};
31 changes: 19 additions & 12 deletions modules/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aragon/sdk-client",
"author": "Aragon Association",
"version": "1.20.0",
"version": "1.19.2",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/sdk-client.esm.js",
Expand All @@ -16,19 +16,18 @@
"node": ">=16"
},
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "TESTING=true tsdx test --verbose --runInBand",
"lint": "tsdx lint",
"prepare": "tsdx build",
"build": "yarn run clean && dts build",
"test": "TESTING=true dts test",
"lint": "dts lint",
"prepare": "yarn build",
"size": "size-limit",
"analyze": "size-limit --why",
"clean": "rm -Rf .turbo dist",
"examples": "node ./scripts/generate-examples-md.js ./examples ./examples.md"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint --fix"
"pre-commit": "yarn run lint --fix"
}
},
"prettier": {
Expand All @@ -49,16 +48,23 @@
],
"devDependencies": {
"@ensdomains/ens-contracts": "^0.0.15",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@size-limit/preset-small-lib": "^7.0.8",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jest": "^29.0.3",
"ganache": "^7.5.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@uniswap/sdk-core": "^4.0.9",
"dts-cli": "^2.0.3",
"glob": "^8.0.3",
"hardhat": "^2.19.1",
"husky": "^7.0.4",
"jest-environment-hardhat": "^1.1.9",
"jest-environment-jsdom": "^29.7.0",
"osx-ethers-v1": "npm:@aragon/[email protected]",
"size-limit": "^7.0.8",
"tsdx": "^0.14.1",
"tslib": "^2.3.1",
"typescript": "^4.6.2"
"tslib": "^2.6.2",
"typescript": "^5.2.2"
},
"dependencies": {
"@aragon/osx-ethers": "1.3.0-rc0.4",
Expand All @@ -77,7 +83,8 @@
"yup": "^1.2.0"
},
"jest": {
"testEnvironment": "../../test-environment.js",
"preset": "ts-jest",
"testEnvironment": "./test-environment.ts",
"testTimeout": 120000
}
}
1 change: 0 additions & 1 deletion modules/client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export * from "./tokenVoting";
export * from "./client-common";
export * from "./multisig";
export * from "./types";

// Selective reexports for completeness
export {
ApplyInstallationParams,
Expand Down
Loading

0 comments on commit 2e6c804

Please sign in to comment.