Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: js-packages structure #1054

Merged
merged 1 commit into from
Feb 13, 2024
Merged

Conversation

uandysmith
Copy link
Contributor

New evm-abi package
Remove old zombienet migrations
Move eth playgrounds to test-utils
Remove all dependencies on "@unique/tests"

import {makeNames} from '@unique/test-utils/util.js';

const {dirname} = makeNames(import.meta.url);
const EVM_ABI_DIR = `${dirname}/../../../evm-abi`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const EVM_ABI_DIR = `${dirname}/../../../evm-abi`;
const EVM_ABI_DIR = await import.meta.resolve('@unique/evm-abi');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оно, видимо, с воркспейсами не работает
Error: Cannot find package '/home/ubuntu/vscode-remote/unique-chain/js-packages/node_modules/@unique-nft/evm-abi/'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это typescript жалуется, или node.js? Node.js по идее не должен, оно работает точно с такими же резолюциями как и просто import же

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нода, т.к. уже при запуске тестов это происходит, в рантайме.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И это странно, ведь у нас не транспилирует импорты, а их резолвит

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А через импорты выходит evm-abi использовать?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Через импорты выходит, см #js-packages/test-utils/eth/index.ts

@uandysmith uandysmith force-pushed the feature/refactor-tests-eth branch from 927de33 to 8ba76b1 Compare January 14, 2024 15:02
@uandysmith uandysmith force-pushed the feature/refactor-tests-eth branch from 8ba76b1 to 4da0499 Compare January 14, 2024 15:52
@CertainLach CertainLach merged commit fe4617c into develop Feb 13, 2024
22 checks passed
@CertainLach CertainLach deleted the feature/refactor-tests-eth branch February 13, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants