-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Enable partial transpilation for upgradeable package #4628
Conversation
🦋 Changeset detectedLatest commit: 5336454 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -36,7 +37,8 @@ npx @openzeppelin/upgrade-safe-transpiler@latest -D \ | |||
-x '!contracts/proxy/beacon/IBeacon.sol' \ | |||
-p 'contracts/**/presets/**/*' \ | |||
-n \ | |||
-N 'contracts/mocks/**/*' | |||
-N 'contracts/mocks/**/*' \ | |||
-q '@openzeppelin/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Amxx Does this look right to you? We have to do this because the contract source paths already have a contracts/
prefix, but it's not really true that @openzeppelin/
is the peer dependency. Ideally I would write something like @openzeppelin/contracts/=contracts/
, like a Foundry remapping, but I don't want to complicate the transpiler more...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used to do -q '@openzeppelin/contracts/..
for my tests. What you wrote works just fine.
We can change to a remaping / remapings in a further version of the transpiler
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Things that don't need to be transpiled for upgradeability, such as interfaces, libraries, and some stateless contracts, are now imported into
@openzeppelin/contracts-upgradeable
from a peer dependency on@openzeppelin/contracts
.Uses OpenZeppelin/openzeppelin-transpiler#130.
Fixes #3928.