Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 514a291

Browse files
authored
Merge branch 'develop' into nh/web3-4x-upgrade
2 parents 29671cc + e7dfcde commit 514a291

File tree

43 files changed

+447
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+447
-263
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ packages/truffle/$RECYCLE.BIN/
2222
packages/debugger/.tmp
2323

2424
# @truffle/contract
25-
packages/contract/dist
25+
packages/contract/browser-dist

packages/abi-utils/.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["../../.eslintrc.package.json"],
3+
"overrides": [
4+
{
5+
"files": ["./lib/**/*.test.[tj]s"],
6+
"env": {
7+
"jest": true
8+
}
9+
}
10+
]
11+
}

packages/abi-utils/lib/arbitrary.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { testProp } from "jest-fast-check";
1+
import { testProp } from "@fast-check/jest";
22
import * as abiSchema from "@truffle/contract-schema/spec/abi.spec.json";
33
import { matchers } from "jest-json-schema";
44

packages/abi-utils/lib/arbitrary.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ export const ConstructorEntry = () =>
148148
type: fc.constant("constructor"),
149149
inputs: fc.array(Parameter(), { maxLength: 10 }).filter(inputs => {
150150
// names that are not blank should be unique
151-
const names = inputs.map(({ name }) => name).filter(name => name !== "");
151+
const names = inputs
152+
.map(({ name }) => name)
153+
.filter(name => name !== "");
152154
return names.length === new Set(names).size;
153155
})
154156
}),
@@ -248,7 +250,7 @@ const Type: fc.Memo<string> = fc.memo(n =>
248250

249251
const ArrayFixed = fc.memo(n =>
250252
fc
251-
.tuple(Type(n - 1), fc.integer(1, 256))
253+
.tuple(Type(n - 1), fc.integer({ min: 1, max: 256 }))
252254
.map(([type, length]) => `${type}[${length}]`)
253255
);
254256

@@ -405,7 +407,7 @@ const fakerToArb = (template: string, transform = camelCase) => {
405407
};
406408

407409
const ParameterName = () =>
408-
fc.frequency(
410+
fc.oneof(
409411
{ arbitrary: fakerToArb("{{hacker.noun}}"), weight: 9 },
410412
{ arbitrary: fc.constant(""), weight: 1 }
411413
);

packages/abi-utils/lib/normalize.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "jest-extended";
2-
import { testProp } from "jest-fast-check";
2+
import { testProp } from "@fast-check/jest";
33

44
import * as Arbitrary from "./arbitrary";
55

@@ -48,9 +48,7 @@ describe("normalize", () => {
4848

4949
expect(
5050
abi.filter(({ type }) => type !== "event" && type !== "error")
51-
).toSatisfyAll(
52-
entry => "stateMutability" in entry
53-
);
51+
).toSatisfyAll(entry => "stateMutability" in entry);
5452
}
5553
);
5654

packages/abi-utils/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@
2626
"dependencies": {
2727
"change-case": "3.0.2",
2828
"faker": "5.5.3",
29-
"fast-check": "2.15.1"
29+
"fast-check": "3.1.1"
3030
},
3131
"devDependencies": {
32+
"@fast-check/jest": "^1.0.1",
3233
"@truffle/contract-schema": "^3.4.8",
3334
"@types/faker": "^5.1.2",
3435
"@types/jest": "27.4.1",
3536
"@types/jest-json-schema": "^2.1.2",
3637
"jest": "28.1.3",
3738
"jest-extended": "^0.11.5",
38-
"jest-fast-check": "2.0.0",
3939
"jest-json-schema": "^2.1.0",
40-
"ts-jest": "28.0.6",
40+
"ts-jest": "28.0.7",
4141
"ts-node": "10.7.0",
4242
"typescript": "^4.1.4"
4343
},

packages/abi-utils/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
4848
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
4949
// "typeRoots": [], /* List of folders to include type definitions from. */
50-
// "types": [], /* Type declaration files to be included in compilation. */
50+
"types": ["node", "jest"], /* Type declaration files to be included in compilation. */
5151
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
5252
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
5353
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */

packages/artifactor/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"bugs": {
1414
"url": "https://github.com/trufflesuite/truffle/issues"
1515
},
16-
"version": "4.0.163",
16+
"version": "4.0.164",
1717
"main": "dist/index.js",
1818
"scripts": {
1919
"build": "tsc",
@@ -27,7 +27,7 @@
2727
"lodash": "^4.17.21"
2828
},
2929
"devDependencies": {
30-
"@truffle/contract": "^4.5.19",
30+
"@truffle/contract": "^4.5.20",
3131
"@types/fs-extra": "^8.1.0",
3232
"@types/lodash": "^4.14.179",
3333
"@types/node": "12.12.21",

packages/codec/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"bugs": {
1313
"url": "https://github.com/trufflesuite/truffle/issues"
1414
},
15-
"version": "0.13.3",
15+
"version": "0.14.0",
1616
"main": "dist/lib/index.js",
1717
"files": [
1818
"dist"
@@ -47,6 +47,7 @@
4747
"@types/semver": "^6.0.0",
4848
"@types/utf8": "^2.1.6",
4949
"@zerollup/ts-transform-paths": "^1.7.3",
50+
"ts-node": "10.7.0",
5051
"ttypescript": "1.5.13",
5152
"typedoc": "0.20.37",
5253
"typedoc-plugin-remove-references": "^0.0.5",

packages/compile-solidity/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"bugs": {
1313
"url": "https://github.com/trufflesuite/truffle/issues"
1414
},
15-
"version": "6.0.37",
15+
"version": "6.0.38",
1616
"main": "dist/index.js",
1717
"scripts": {
1818
"build": "ttsc",
@@ -38,9 +38,9 @@
3838
"solc": "0.8.15"
3939
},
4040
"devDependencies": {
41-
"@truffle/artifactor": "^4.0.163",
41+
"@truffle/artifactor": "^4.0.164",
4242
"@truffle/box": "^2.1.54",
43-
"@truffle/resolver": "^9.0.10",
43+
"@truffle/resolver": "^9.0.11",
4444
"babel-core": "^6.26.0",
4545
"babel-polyfill": "^6.26.0",
4646
"babel-preset-env": "^1.6.1",

0 commit comments

Comments
 (0)