@hyperlane-xyz/utils 28.1.0 → 29.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addresses.d.ts +1 -1
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +5 -7
- package/dist/addresses.js.map +1 -1
- package/dist/validator.d.ts.map +1 -1
- package/dist/validator.js +7 -4
- package/dist/validator.js.map +1 -1
- package/package.json +7 -5
- package/dist/addresses.test.d.ts +0 -2
- package/dist/addresses.test.d.ts.map +0 -1
- package/dist/addresses.test.js +0 -124
- package/dist/addresses.test.js.map +0 -1
- package/dist/amount.test.d.ts +0 -2
- package/dist/amount.test.d.ts.map +0 -1
- package/dist/amount.test.js +0 -113
- package/dist/amount.test.js.map +0 -1
- package/dist/arrays.test.d.ts +0 -2
- package/dist/arrays.test.d.ts.map +0 -1
- package/dist/arrays.test.js +0 -77
- package/dist/arrays.test.js.map +0 -1
- package/dist/async.test.d.ts +0 -2
- package/dist/async.test.d.ts.map +0 -1
- package/dist/async.test.js +0 -335
- package/dist/async.test.js.map +0 -1
- package/dist/base58.test.d.ts +0 -2
- package/dist/base58.test.d.ts.map +0 -1
- package/dist/base58.test.js +0 -31
- package/dist/base58.test.js.map +0 -1
- package/dist/base64.test.d.ts +0 -2
- package/dist/base64.test.d.ts.map +0 -1
- package/dist/base64.test.js +0 -54
- package/dist/base64.test.js.map +0 -1
- package/dist/big-numbers.test.d.ts +0 -2
- package/dist/big-numbers.test.d.ts.map +0 -1
- package/dist/big-numbers.test.js +0 -96
- package/dist/big-numbers.test.js.map +0 -1
- package/dist/checkpoints.test.d.ts +0 -2
- package/dist/checkpoints.test.d.ts.map +0 -1
- package/dist/checkpoints.test.js +0 -105
- package/dist/checkpoints.test.js.map +0 -1
- package/dist/env.test.d.ts +0 -2
- package/dist/env.test.d.ts.map +0 -1
- package/dist/env.test.js +0 -16
- package/dist/env.test.js.map +0 -1
- package/dist/eslint-rules/no-restricted-imports-from-exports.test.d.ts +0 -2
- package/dist/eslint-rules/no-restricted-imports-from-exports.test.d.ts.map +0 -1
- package/dist/eslint-rules/no-restricted-imports-from-exports.test.js +0 -259
- package/dist/eslint-rules/no-restricted-imports-from-exports.test.js.map +0 -1
- package/dist/eslint-rules/sort-yaml-arrays.test.d.ts +0 -2
- package/dist/eslint-rules/sort-yaml-arrays.test.d.ts.map +0 -1
- package/dist/eslint-rules/sort-yaml-arrays.test.js +0 -629
- package/dist/eslint-rules/sort-yaml-arrays.test.js.map +0 -1
- package/dist/fs/format.test.d.ts +0 -2
- package/dist/fs/format.test.d.ts.map +0 -1
- package/dist/fs/format.test.js +0 -153
- package/dist/fs/format.test.js.map +0 -1
- package/dist/fs/json.test.d.ts +0 -2
- package/dist/fs/json.test.d.ts.map +0 -1
- package/dist/fs/json.test.js +0 -148
- package/dist/fs/json.test.js.map +0 -1
- package/dist/fs/utils.test.d.ts +0 -2
- package/dist/fs/utils.test.d.ts.map +0 -1
- package/dist/fs/utils.test.js +0 -120
- package/dist/fs/utils.test.js.map +0 -1
- package/dist/fs/yaml.test.d.ts +0 -2
- package/dist/fs/yaml.test.d.ts.map +0 -1
- package/dist/fs/yaml.test.js +0 -134
- package/dist/fs/yaml.test.js.map +0 -1
- package/dist/ids.test.d.ts +0 -2
- package/dist/ids.test.d.ts.map +0 -1
- package/dist/ids.test.js +0 -39
- package/dist/ids.test.js.map +0 -1
- package/dist/lazy.test.d.ts +0 -2
- package/dist/lazy.test.d.ts.map +0 -1
- package/dist/lazy.test.js +0 -129
- package/dist/lazy.test.js.map +0 -1
- package/dist/logging.test.d.ts +0 -2
- package/dist/logging.test.d.ts.map +0 -1
- package/dist/logging.test.js +0 -35
- package/dist/logging.test.js.map +0 -1
- package/dist/math.test.d.ts +0 -2
- package/dist/math.test.d.ts.map +0 -1
- package/dist/math.test.js +0 -45
- package/dist/math.test.js.map +0 -1
- package/dist/objects.test.d.ts +0 -2
- package/dist/objects.test.d.ts.map +0 -1
- package/dist/objects.test.js +0 -655
- package/dist/objects.test.js.map +0 -1
- package/dist/rpc.test.d.ts +0 -2
- package/dist/rpc.test.d.ts.map +0 -1
- package/dist/rpc.test.js +0 -49
- package/dist/rpc.test.js.map +0 -1
- package/dist/sets.test.d.ts +0 -2
- package/dist/sets.test.d.ts.map +0 -1
- package/dist/sets.test.js +0 -35
- package/dist/sets.test.js.map +0 -1
- package/dist/strings.test.d.ts +0 -2
- package/dist/strings.test.d.ts.map +0 -1
- package/dist/strings.test.js +0 -42
- package/dist/strings.test.js.map +0 -1
- package/dist/typeof.test.d.ts +0 -2
- package/dist/typeof.test.d.ts.map +0 -1
- package/dist/typeof.test.js +0 -34
- package/dist/typeof.test.js.map +0 -1
- package/dist/url.test.d.ts +0 -2
- package/dist/url.test.d.ts.map +0 -1
- package/dist/url.test.js +0 -29
- package/dist/url.test.js.map +0 -1
- package/dist/validation.test.d.ts +0 -2
- package/dist/validation.test.d.ts.map +0 -1
- package/dist/validation.test.js +0 -11
- package/dist/validation.test.js.map +0 -1
- package/dist/yaml.test.d.ts +0 -2
- package/dist/yaml.test.d.ts.map +0 -1
- package/dist/yaml.test.js +0 -519
- package/dist/yaml.test.js.map +0 -1
package/dist/checkpoints.test.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import { isCheckpoint, isS3Checkpoint, isS3CheckpointWithId, isValidSignature, } from './checkpoints.js';
|
|
3
|
-
describe('Checkpoints', () => {
|
|
4
|
-
describe('isValidSignature', () => {
|
|
5
|
-
it('should return true for valid string signature', () => {
|
|
6
|
-
const signature = '0x' + 'a'.repeat(130); // Example of a valid hex string
|
|
7
|
-
expect(isValidSignature(signature)).to.be.true;
|
|
8
|
-
});
|
|
9
|
-
it('should return true for valid object signature', () => {
|
|
10
|
-
const signature = {
|
|
11
|
-
r: '0x' + 'a'.repeat(64),
|
|
12
|
-
s: '0x' + 'b'.repeat(64),
|
|
13
|
-
v: 27,
|
|
14
|
-
};
|
|
15
|
-
expect(isValidSignature(signature)).to.be.true;
|
|
16
|
-
});
|
|
17
|
-
it('should return false for invalid signature', () => {
|
|
18
|
-
const signature = {
|
|
19
|
-
r: '0x' + 'a'.repeat(64),
|
|
20
|
-
s: '0x' + 'b'.repeat(64),
|
|
21
|
-
v: 'invalid',
|
|
22
|
-
};
|
|
23
|
-
expect(isValidSignature(signature)).to.be.false;
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
describe('isCheckpoint', () => {
|
|
27
|
-
it('should return true for valid checkpoint', () => {
|
|
28
|
-
const checkpoint = {
|
|
29
|
-
root: '0x' + 'a'.repeat(64),
|
|
30
|
-
index: 1,
|
|
31
|
-
merkle_tree_hook_address: '0x' + 'b'.repeat(40),
|
|
32
|
-
mailbox_domain: 123,
|
|
33
|
-
};
|
|
34
|
-
expect(isCheckpoint(checkpoint)).to.be.true;
|
|
35
|
-
});
|
|
36
|
-
it('should return false for invalid checkpoint', () => {
|
|
37
|
-
const checkpoint = {
|
|
38
|
-
root: 'invalid',
|
|
39
|
-
index: 'invalid',
|
|
40
|
-
merkle_tree_hook_address: 'invalid',
|
|
41
|
-
mailbox_domain: 'invalid',
|
|
42
|
-
};
|
|
43
|
-
expect(isCheckpoint(checkpoint)).to.be.false;
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
describe('isS3Checkpoint', () => {
|
|
47
|
-
it('should return true for valid S3Checkpoint', () => {
|
|
48
|
-
const s3Checkpoint = {
|
|
49
|
-
signature: '0x' + 'a'.repeat(130),
|
|
50
|
-
value: {
|
|
51
|
-
root: '0x' + 'a'.repeat(64),
|
|
52
|
-
index: 1,
|
|
53
|
-
merkle_tree_hook_address: '0x' + 'b'.repeat(40),
|
|
54
|
-
mailbox_domain: 123,
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
expect(isS3Checkpoint(s3Checkpoint)).to.be.true;
|
|
58
|
-
});
|
|
59
|
-
it('should return false for invalid S3Checkpoint', () => {
|
|
60
|
-
const s3Checkpoint = {
|
|
61
|
-
signature: 'invalid',
|
|
62
|
-
value: {
|
|
63
|
-
root: 'invalid',
|
|
64
|
-
index: 'invalid',
|
|
65
|
-
merkle_tree_hook_address: 'invalid',
|
|
66
|
-
mailbox_domain: 'invalid',
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
expect(isS3Checkpoint(s3Checkpoint)).to.be.false;
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
describe('isS3CheckpointWithId', () => {
|
|
73
|
-
it('should return true for valid S3CheckpointWithId', () => {
|
|
74
|
-
const s3CheckpointWithId = {
|
|
75
|
-
signature: '0x' + 'a'.repeat(130),
|
|
76
|
-
value: {
|
|
77
|
-
checkpoint: {
|
|
78
|
-
root: '0x' + 'a'.repeat(64),
|
|
79
|
-
index: 1,
|
|
80
|
-
merkle_tree_hook_address: '0x' + 'b'.repeat(40),
|
|
81
|
-
mailbox_domain: 123,
|
|
82
|
-
},
|
|
83
|
-
message_id: '0x' + 'c'.repeat(64),
|
|
84
|
-
},
|
|
85
|
-
};
|
|
86
|
-
expect(isS3CheckpointWithId(s3CheckpointWithId)).to.be.true;
|
|
87
|
-
});
|
|
88
|
-
it('should return false for invalid S3CheckpointWithId', () => {
|
|
89
|
-
const s3CheckpointWithId = {
|
|
90
|
-
signature: 'invalid',
|
|
91
|
-
value: {
|
|
92
|
-
checkpoint: {
|
|
93
|
-
root: 'invalid',
|
|
94
|
-
index: 'invalid',
|
|
95
|
-
merkle_tree_hook_address: 'invalid',
|
|
96
|
-
mailbox_domain: 'invalid',
|
|
97
|
-
},
|
|
98
|
-
message_id: 'invalid',
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
expect(isS3CheckpointWithId(s3CheckpointWithId)).to.be.false;
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
//# sourceMappingURL=checkpoints.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoints.test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,KAAK,EAAE,SAAS;wBAChB,wBAAwB,EAAE,SAAS;wBACnC,cAAc,EAAE,SAAS;qBAC1B;oBACD,UAAU,EAAE,SAAS;iBACtB;aACF,CAAC;YACF,MAAM,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC/D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/env.test.d.ts
DELETED
package/dist/env.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.test.d.ts","sourceRoot":"","sources":["../src/env.test.ts"],"names":[],"mappings":""}
|
package/dist/env.test.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import { safelyAccessEnvVar } from './env.js';
|
|
3
|
-
describe('Env Utilities', () => {
|
|
4
|
-
describe('safelyAccessEnvVar', () => {
|
|
5
|
-
it('should return the environment variable', () => {
|
|
6
|
-
process.env.TEST_VAR = '0xTEST_VAR';
|
|
7
|
-
expect(safelyAccessEnvVar('TEST_VAR')).to.equal('0xTEST_VAR');
|
|
8
|
-
expect(safelyAccessEnvVar('TEST_VAR', true)).to.equal('0xtest_var');
|
|
9
|
-
});
|
|
10
|
-
it('should return undefined if the environment variable is not set', () => {
|
|
11
|
-
expect(safelyAccessEnvVar('NON_EXISTENT_VAR')).to.be.undefined;
|
|
12
|
-
expect(safelyAccessEnvVar('NON_EXISTENT_VAR', true)).to.be.undefined;
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=env.test.js.map
|
package/dist/env.test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.test.js","sourceRoot":"","sources":["../src/env.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,YAAY,CAAC;YACpC,MAAM,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAC9D,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;YACxE,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC;YAC/D,MAAM,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"no-restricted-imports-from-exports.test.d.ts","sourceRoot":"","sources":["../../src/eslint-rules/no-restricted-imports-from-exports.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import { expect } from 'chai';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import sinon from 'sinon';
|
|
5
|
-
import rule from './no-restricted-imports-from-exports.js';
|
|
6
|
-
describe('no-restricted-imports-from-exports rule', () => {
|
|
7
|
-
// Mock file contents to simulate index exports
|
|
8
|
-
const exportedFileContents = {
|
|
9
|
-
'./src/index.ts': "export { componentA } from './components/componentA';\nexport { componentB } from './components/componentB';",
|
|
10
|
-
'./src/index-fs.ts': "export { fileUtil } from './utils/fileUtil';",
|
|
11
|
-
};
|
|
12
|
-
// Path mapping for test fixtures
|
|
13
|
-
const pathMappings = {
|
|
14
|
-
'./src/index.ts': './src/index.ts',
|
|
15
|
-
'./src/index-fs.ts': './src/index-fs.ts',
|
|
16
|
-
'components/componentA': './src/components/componentA',
|
|
17
|
-
'components/componentB': './src/components/componentB',
|
|
18
|
-
'components/nested/componentA': './src/components/nested/componentA',
|
|
19
|
-
'utils/fileUtil': './src/utils/fileUtil',
|
|
20
|
-
'utils/otherUtil': './src/utils/otherUtil',
|
|
21
|
-
};
|
|
22
|
-
function setupStubs() {
|
|
23
|
-
// Stub fs.readFileSync to return mock file contents
|
|
24
|
-
sinon
|
|
25
|
-
.stub(fs, 'readFileSync')
|
|
26
|
-
.callsFake((filePath) => typeof filePath === 'string'
|
|
27
|
-
? exportedFileContents[filePath] || ''
|
|
28
|
-
: '');
|
|
29
|
-
// Stub path.resolve to simplify path resolution in tests
|
|
30
|
-
sinon.stub(path, 'resolve').callsFake(function (...args) {
|
|
31
|
-
const lastArg = args[args.length - 1];
|
|
32
|
-
if (typeof lastArg !== 'string') {
|
|
33
|
-
return String(lastArg);
|
|
34
|
-
}
|
|
35
|
-
for (const [pattern, mapping] of Object.entries(pathMappings)) {
|
|
36
|
-
if (lastArg.includes(pattern)) {
|
|
37
|
-
return mapping;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return lastArg;
|
|
41
|
-
});
|
|
42
|
-
sinon
|
|
43
|
-
.stub(path, 'dirname')
|
|
44
|
-
.callsFake((filePath) => filePath.substring(0, filePath.lastIndexOf('/') || 0));
|
|
45
|
-
}
|
|
46
|
-
// Helper function to test import validations in different scenarios
|
|
47
|
-
function verifyImport({ sourceFile, importPath, expectedError, shouldPass = false, options = {}, }) {
|
|
48
|
-
const errors = [];
|
|
49
|
-
const context = {
|
|
50
|
-
getFilename: () => sourceFile,
|
|
51
|
-
cwd: () => '.',
|
|
52
|
-
report: (err) => errors.push(err),
|
|
53
|
-
options: [options],
|
|
54
|
-
};
|
|
55
|
-
const ruleInstance = rule.create(context);
|
|
56
|
-
if (ruleInstance?.ImportDeclaration) {
|
|
57
|
-
ruleInstance.ImportDeclaration({
|
|
58
|
-
type: 'ImportDeclaration',
|
|
59
|
-
source: {
|
|
60
|
-
type: 'Literal',
|
|
61
|
-
value: importPath,
|
|
62
|
-
raw: `'${importPath}'`,
|
|
63
|
-
},
|
|
64
|
-
specifiers: [],
|
|
65
|
-
attributes: [],
|
|
66
|
-
parent: {},
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
if (expectedError || !shouldPass) {
|
|
70
|
-
expect(errors.length).to.equal(1, `Import from ${sourceFile} to ${importPath} should report an error`);
|
|
71
|
-
if (expectedError) {
|
|
72
|
-
expect(errors[0].messageId).to.equal(expectedError, `Import should report error type ${expectedError}`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
expect(errors.length).to.equal(0, `Import from ${sourceFile} to ${importPath} should not report any errors`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
beforeEach(() => {
|
|
80
|
-
setupStubs();
|
|
81
|
-
});
|
|
82
|
-
afterEach(() => {
|
|
83
|
-
// Restore all stubs
|
|
84
|
-
sinon.restore();
|
|
85
|
-
});
|
|
86
|
-
describe('Non-exported files - Files not included in index exports', () => {
|
|
87
|
-
it('should allow importing node modules in non-exported files', () => {
|
|
88
|
-
verifyImport({
|
|
89
|
-
sourceFile: './src/other.ts',
|
|
90
|
-
importPath: 'fs',
|
|
91
|
-
shouldPass: true,
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
it('should allow importing any modules in non-exported files without restrictions', () => {
|
|
95
|
-
const sourceFile = './src/other.ts';
|
|
96
|
-
verifyImport({
|
|
97
|
-
sourceFile,
|
|
98
|
-
importPath: './components/other',
|
|
99
|
-
shouldPass: true,
|
|
100
|
-
});
|
|
101
|
-
verifyImport({
|
|
102
|
-
sourceFile,
|
|
103
|
-
importPath: './utils/fileUtil',
|
|
104
|
-
shouldPass: true,
|
|
105
|
-
});
|
|
106
|
-
verifyImport({
|
|
107
|
-
sourceFile,
|
|
108
|
-
importPath: 'path',
|
|
109
|
-
shouldPass: true,
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
describe('Exported files - Files that are exported through index.ts', () => {
|
|
114
|
-
const exportedComponentFile = './src/components/componentA.ts';
|
|
115
|
-
it('should allow importing regular modules from exported files', () => {
|
|
116
|
-
verifyImport({
|
|
117
|
-
sourceFile: exportedComponentFile,
|
|
118
|
-
importPath: './components/other',
|
|
119
|
-
shouldPass: true,
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
it('should disallow importing node modules from exported files to prevent side effects', () => {
|
|
123
|
-
verifyImport({
|
|
124
|
-
sourceFile: exportedComponentFile,
|
|
125
|
-
importPath: 'fs',
|
|
126
|
-
expectedError: 'restrictedNodeImport',
|
|
127
|
-
});
|
|
128
|
-
verifyImport({
|
|
129
|
-
sourceFile: exportedComponentFile,
|
|
130
|
-
importPath: 'path',
|
|
131
|
-
expectedError: 'restrictedNodeImport',
|
|
132
|
-
});
|
|
133
|
-
verifyImport({
|
|
134
|
-
sourceFile: exportedComponentFile,
|
|
135
|
-
importPath: 'crypto',
|
|
136
|
-
expectedError: 'restrictedNodeImport',
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
it('should disallow importing from fs-indexed modules in exported components', () => {
|
|
140
|
-
verifyImport({
|
|
141
|
-
sourceFile: exportedComponentFile,
|
|
142
|
-
importPath: './utils/fileUtil',
|
|
143
|
-
expectedError: 'restrictedFsImport',
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
it('should handle relative imports correctly and detect restricted fs imports', () => {
|
|
147
|
-
verifyImport({
|
|
148
|
-
sourceFile: exportedComponentFile,
|
|
149
|
-
importPath: '../utils/fileUtil',
|
|
150
|
-
expectedError: 'restrictedFsImport',
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
it('should allow importing scoped packages even from exported components', () => {
|
|
154
|
-
verifyImport({
|
|
155
|
-
sourceFile: exportedComponentFile,
|
|
156
|
-
importPath: '@scoped/fs-module',
|
|
157
|
-
shouldPass: true,
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
it('should allow files exported from index-fs.ts to import node modules directly', () => {
|
|
161
|
-
const fileUtilPath = './src/utils/fileUtil.ts';
|
|
162
|
-
verifyImport({
|
|
163
|
-
sourceFile: fileUtilPath,
|
|
164
|
-
importPath: 'fs',
|
|
165
|
-
shouldPass: true,
|
|
166
|
-
});
|
|
167
|
-
verifyImport({
|
|
168
|
-
sourceFile: fileUtilPath,
|
|
169
|
-
importPath: 'crypto',
|
|
170
|
-
shouldPass: true,
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
});
|
|
174
|
-
describe('Edge cases', () => {
|
|
175
|
-
const exportedComponentFile = './src/components/componentA.ts';
|
|
176
|
-
it('should handle subpaths of node modules correctly and restrict them in exported files', () => {
|
|
177
|
-
verifyImport({
|
|
178
|
-
sourceFile: exportedComponentFile,
|
|
179
|
-
importPath: 'fs/promises',
|
|
180
|
-
expectedError: 'restrictedNodeImport',
|
|
181
|
-
});
|
|
182
|
-
verifyImport({
|
|
183
|
-
sourceFile: exportedComponentFile,
|
|
184
|
-
importPath: 'path/posix',
|
|
185
|
-
expectedError: 'restrictedNodeImport',
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
it('should allow similarly named packages that are not actual node modules', () => {
|
|
189
|
-
verifyImport({
|
|
190
|
-
sourceFile: exportedComponentFile,
|
|
191
|
-
importPath: 'fstest',
|
|
192
|
-
shouldPass: true,
|
|
193
|
-
});
|
|
194
|
-
verifyImport({
|
|
195
|
-
sourceFile: exportedComponentFile,
|
|
196
|
-
importPath: 'fs-test',
|
|
197
|
-
shouldPass: true,
|
|
198
|
-
});
|
|
199
|
-
verifyImport({
|
|
200
|
-
sourceFile: exportedComponentFile,
|
|
201
|
-
importPath: 'path-extra',
|
|
202
|
-
shouldPass: true,
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
it('should handle non-existent files gracefully without throwing errors', () => {
|
|
206
|
-
verifyImport({
|
|
207
|
-
sourceFile: exportedComponentFile,
|
|
208
|
-
importPath: './non-existent-file',
|
|
209
|
-
shouldPass: true,
|
|
210
|
-
});
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
describe('Custom entry points', () => {
|
|
214
|
-
const customExportedFileContents = {
|
|
215
|
-
'./src/main.ts': "export { customComponent } from './components/customComponent';",
|
|
216
|
-
'./src/restricted.ts': "export { restrictedUtil } from './utils/restrictedUtil';",
|
|
217
|
-
};
|
|
218
|
-
beforeEach(() => {
|
|
219
|
-
// Add custom file contents to the existing exportedFileContents
|
|
220
|
-
Object.assign(exportedFileContents, customExportedFileContents);
|
|
221
|
-
// Add custom path mappings
|
|
222
|
-
Object.assign(pathMappings, {
|
|
223
|
-
'./src/main.ts': './src/main.ts',
|
|
224
|
-
'./src/restricted.ts': './src/restricted.ts',
|
|
225
|
-
'components/customComponent': './src/components/customComponent',
|
|
226
|
-
'utils/restrictedUtil': './src/utils/restrictedUtil',
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
it('should respect custom main and restricted entry points', () => {
|
|
230
|
-
const options = {
|
|
231
|
-
mainEntry: './src/main.ts',
|
|
232
|
-
restrictedEntry: './src/restricted.ts',
|
|
233
|
-
};
|
|
234
|
-
// Test with custom entry points
|
|
235
|
-
verifyImport({
|
|
236
|
-
sourceFile: './src/components/customComponent.ts',
|
|
237
|
-
importPath: './utils/restrictedUtil',
|
|
238
|
-
expectedError: 'restrictedFsImport',
|
|
239
|
-
options,
|
|
240
|
-
});
|
|
241
|
-
// Should still work for node modules
|
|
242
|
-
verifyImport({
|
|
243
|
-
sourceFile: './src/components/customComponent.ts',
|
|
244
|
-
importPath: 'fs',
|
|
245
|
-
expectedError: 'restrictedNodeImport',
|
|
246
|
-
options,
|
|
247
|
-
});
|
|
248
|
-
});
|
|
249
|
-
it('should fall back to defaults when no options provided', () => {
|
|
250
|
-
// Test with default entry points
|
|
251
|
-
verifyImport({
|
|
252
|
-
sourceFile: './src/components/componentA.ts',
|
|
253
|
-
importPath: './utils/fileUtil',
|
|
254
|
-
expectedError: 'restrictedFsImport',
|
|
255
|
-
});
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
//# sourceMappingURL=no-restricted-imports-from-exports.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"no-restricted-imports-from-exports.test.js","sourceRoot":"","sources":["../../src/eslint-rules/no-restricted-imports-from-exports.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,yCAAyC,CAAC;AAkB3D,QAAQ,CAAC,yCAAyC,EAAE,GAAG,EAAE;IACvD,+CAA+C;IAC/C,MAAM,oBAAoB,GAAyB;QACjD,gBAAgB,EACd,8GAA8G;QAChH,mBAAmB,EAAE,8CAA8C;KACpE,CAAC;IAEF,iCAAiC;IACjC,MAAM,YAAY,GAAiB;QACjC,gBAAgB,EAAE,gBAAgB;QAClC,mBAAmB,EAAE,mBAAmB;QAExC,uBAAuB,EAAE,6BAA6B;QACtD,uBAAuB,EAAE,6BAA6B;QACtD,8BAA8B,EAAE,oCAAoC;QAEpE,gBAAgB,EAAE,sBAAsB;QACxC,iBAAiB,EAAE,uBAAuB;KAC3C,CAAC;IAEF,SAAS,UAAU;QACjB,oDAAoD;QACpD,KAAK;aACF,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC;aACxB,SAAS,CAAC,CAAC,QAA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E,GAAG,EAAE;YAChE,MAAM,OAAO,GAAG;gBACd,SAAS,EAAE,eAAe;gBAC1B,eAAe,EAAE,qBAAqB;aACvC,CAAC;YAEF,gCAAgC;YAChC,YAAY,CAAC;gBACX,UAAU,EAAE,qCAAqC;gBACjD,UAAU,EAAE,wBAAwB;gBACpC,aAAa,EAAE,oBAAoB;gBACnC,OAAO;aACR,CAAC,CAAC;YAEH,qCAAqC;YACrC,YAAY,CAAC;gBACX,UAAU,EAAE,qCAAqC;gBACjD,UAAU,EAAE,IAAI;gBAChB,aAAa,EAAE,sBAAsB;gBACrC,OAAO;aACR,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;YAC/D,iCAAiC;YACjC,YAAY,CAAC;gBACX,UAAU,EAAE,gCAAgC;gBAC5C,UAAU,EAAE,kBAAkB;gBAC9B,aAAa,EAAE,oBAAoB;aACpC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sort-yaml-arrays.test.d.ts","sourceRoot":"","sources":["../../src/eslint-rules/sort-yaml-arrays.test.ts"],"names":[],"mappings":""}
|