Skip to content

Commit c17ddef

Browse files
Merge pull request #3451 from demergent-labs/dependabot/npm_and_yarn/eslint-8f669a3e4d
deps(dev): bump the eslint group with 3 updates
2 parents e76e93c + 0ecd49c commit c17ddef

File tree

5 files changed

+69
-114
lines changed

5 files changed

+69
-114
lines changed
Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,17 @@
11
import { execSync } from 'child_process';
2-
import { lstatSync, readFileSync, writeFileSync } from 'fs';
32

43
function pretest(): void {
54
execSync(`dfx canister uninstall-code management_canister || true`, {
65
stdio: 'inherit'
76
});
87

9-
// We generate this file without the workaroundForMultipleIDLPathsProblem so that we can do an exact comparison with the azle/canisters/management/idl/index.ts file
10-
execSync(
11-
`npm exec --offline azle generate ../../../../../../src/stable/lib/canisters/management/idl/ic.did > src/idl/management_no_workaround.ts`,
12-
{
13-
stdio: 'inherit'
14-
}
15-
);
16-
17-
execSync(
18-
'npx prettier --ignore-path null --write src/idl/management_no_workaround.ts',
19-
{
20-
stdio: 'inherit'
21-
}
22-
);
23-
248
execSync(
259
`npm exec --offline azle generate ../../../../../../src/stable/lib/canisters/management/idl/ic.did > src/idl/management.ts`,
2610
{
2711
stdio: 'inherit'
2812
}
2913
);
3014

31-
workaroundForMultipleIDLPathsProblem();
32-
3315
execSync('npx prettier --ignore-path null --write src/idl/management.ts', {
3416
stdio: 'inherit'
3517
});
@@ -51,27 +33,3 @@ function pretest(): void {
5133
}
5234

5335
pretest();
54-
55-
// TODO remove once this issue is resolved: https://github.com/dfinity/agent-js/issues/977
56-
// Basically what we do here is to replace import { IDL } from '@dfinity/candid' with import { IDL } from 'azle'
57-
// but only when azle is a symlink (accomplished usually in our dev environment through npm link azle)
58-
// The multiple IDL paths problem only occurs at least in the context of this test, in our local symlink
59-
// testing environment. Users shouldn't run into this issue because they will not have symlinked azle
60-
// The GitHub Actions tests on a release will run this test against azle as an npm package
61-
function workaroundForMultipleIDLPathsProblem(): void {
62-
if (
63-
lstatSync('../../../../../node_modules/azle').isSymbolicLink() === false
64-
) {
65-
return;
66-
}
67-
68-
const generatedTypesPath = 'src/idl/management.ts';
69-
70-
writeFileSync(
71-
generatedTypesPath,
72-
readFileSync(generatedTypesPath, 'utf-8').replace(
73-
/import\s*{\s*IDL\s*}\s*from\s*['"]@dfinity\/candid['"]/g,
74-
"import { IDL } from 'azle'"
75-
)
76-
);
77-
}

examples/stable/test/end_to_end/candid_rpc/management_canister_generate_types/test/test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ runTests(() => {
2121
getTests(managementCanister as any)();
2222

2323
it('should have generated a src/idl/management.ts file identical to azle/canisters/management/idl/index.ts', async () => {
24-
const generatedContent = readFileSync(
25-
'src/idl/management_no_workaround.ts',
26-
'utf-8'
27-
);
24+
const generatedContent = readFileSync('src/idl/management.ts', 'utf-8');
2825

2926
const referenceContent = readFileSync(
3027
'../../../../../../src/stable/lib/canisters/management/idl/index.ts',

package-lock.json

Lines changed: 64 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
"@eslint/js": "^9.35.0",
6363
"@types/semver": "^7.7.1",
6464
"@types/uuid": "^11.0.0",
65-
"@typescript-eslint/eslint-plugin": "^8.42.0",
66-
"@typescript-eslint/parser": "^8.42.0",
65+
"@typescript-eslint/eslint-plugin": "^8.44.0",
66+
"@typescript-eslint/parser": "^8.44.0",
6767
"azle-experimental-deps": "github:demergent-labs/azle-experimental-deps#d520f28563b2d255c7edf5b672da6083fd722259",
6868
"cuzz": "0.0.22",
6969
"eslint": "^9.35.0",
@@ -78,7 +78,7 @@
7878
"puppeteer": "^24.21.0",
7979
"semver": "^7.7.2",
8080
"ts-jest": "^29.4.2",
81-
"typescript-eslint": "^8.42.0",
81+
"typescript-eslint": "^8.44.0",
8282
"uuid": "^13.0.0"
8383
},
8484
"lint-staged": {

src/experimental/test/property/test/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { candidDeepEqual } from 'azle/_internal/test/candid_deep_equal';
44

55
import { jsonStringify } from '#lib/json';
66

7-
export type Test<> = {
7+
export type Test = {
88
name: string;
99
skip?: boolean;
1010
wait?: number;

0 commit comments

Comments
 (0)