This pull request solves a couple of problems, the first being more of an "unknown" problem but one that has been frustrating to work around for some time now.
That is, if you were to delete yarn.lock and your node_modules to do a clean install of node_modules, you would run into a large number of circular dependency ESLint violations. This addresses those violations by also adding support for absolute path resolution across many of the packages.
The only two packages that had circular dependency violations were connect-wallet and tokengate, which are now resolved.
Adds support for absolute path resolution in the following packages:
@shopify/blockchain-components
@shopify/connect-wallet
@shopify/gate-context-client
@shopify/tokengate
This does not add absolute path resolution to the shared package. The reason for this is that the package does not get bundled, as a result this creates issues for packages that utilize components or hooks from the package. For example, if useMediaQuery is used on a component inside of Button, the path will not resolve to the right place due to the path resolution methods used for the shared package.
Much of this work was cherry-picked from #176, but split into different commits so you can see the changes by package.
🎩 How can this be tophatted?
Pull this branch
Remove allnode_modules directories as well as the yarn.lock file.
Run yarn to install all packages.
Run yarn dev
Open the link in your browser to check the functionality of the package. Nothing should have changed, and any errors should have been presented via the CLI / during the build or dev process.
You can also run the package inside any of the example directories by running yarn example and selecting a framework / example to use.
✅ Checklist
[ ] ~Tested on mobile~ N/A
[x] Tested on multiple browsers
[ ] ~Tested for accessibility~ N/A
[x] Includes unit tests
[ ] ~Updated relevant documentation for the changes (if necessary)~ N/A
ℹ️ What is the context for these changes?
This pull request solves a couple of problems, the first being more of an "unknown" problem but one that has been frustrating to work around for some time now.
That is, if you were to delete
yarn.lock
and yournode_modules
to do a clean install ofnode_modules
, you would run into a large number of circular dependency ESLint violations. This addresses those violations by also adding support for absolute path resolution across many of the packages.The only two packages that had circular dependency violations were
connect-wallet
andtokengate
, which are now resolved.Adds support for absolute path resolution in the following packages:
@shopify/blockchain-components
@shopify/connect-wallet
@shopify/gate-context-client
@shopify/tokengate
This does not add absolute path resolution to the
shared
package. The reason for this is that the package does not get bundled, as a result this creates issues for packages that utilize components or hooks from the package. For example, ifuseMediaQuery
is used on a component inside of Button, the path will not resolve to the right place due to the path resolution methods used for theshared
package.Much of this work was cherry-picked from #176, but split into different commits so you can see the changes by package.
🎩 How can this be tophatted?
node_modules
directories as well as theyarn.lock
file.yarn
to install all packages.yarn dev
build
ordev
process.You can also run the package inside any of the example directories by running
yarn example
and selecting a framework / example to use.✅ Checklist