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

🐛 Addresses an issue with exported types from shared #31

Merged
merged 2 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/silver-cougars-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/connect-wallet': patch
'@shopify/tokengate': patch
---

Addresses an issue where types that are used from the internal shared package were not compiled and exported as expected. This resulted in an issue where providing a theme to any of the providers would result in a type mismatch, but also made it impossible to extend or inherit any of the default themes.
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ module.exports = {
prefix: ['T', 'U'],
},
],
'import/order': [
'error',
{
pathGroups: [
{
pattern: 'shared',
group: 'external',
},
],
},
],
'no-catch-shadow': 'off',
'no-console': [
'error',
Expand Down Expand Up @@ -64,6 +75,9 @@ module.exports = {
},
],
},
settings: {
'import/internal-regex': 'shared',
},
overrides: [
{
files: ['**/*.stories.*'],
Expand Down
1 change: 0 additions & 1 deletion packages/connect-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"@types/ua-parser-js": "^0.7.36",
"@wagmi/core": "0.8.10",
"jestconfig": "*",
"shared": "*",
"tsconfig": "*",
"tsup": "^6.5.0"
}
Expand Down
6 changes: 6 additions & 0 deletions packages/connect-wallet/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"shared": ["../shared/src/index.ts"]
}
},
"include": ["./src", "./styled.d.ts"],
"exclude": ["./dist", "node_modules"],
"extends": "tsconfig/base.json"
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"main": "src/index.ts",
"types": "src/index.ts",
"devDependencies": {
"@storybook/react": "^6.5.13",
"@types/styled-components": "^5.1.26",
"tsconfig": "*"
},
"dependencies": {
"@storybook/react": "^6.5.13",
"@types/styled-components": "^5.1.26",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "^5.3.6"
Expand Down
5 changes: 2 additions & 3 deletions packages/tokengate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,17 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@storybook/react": "^6.5.13",
"@types/styled-components": "^5.1.26",
"i18next": "^22.4.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^12.1.4",
"styled-components": "^5.3.6"
},
"devDependencies": {
"@storybook/react": "^6.5.13",
"@types/styled-components": "^5.1.26",
"@testing-library/react": "^13.4.0",
"jestconfig": "*",
"shared": "*",
"tsconfig": "*",
"tsup": "^6.5.0"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SkeletonThumbnail, SkeletonDisplayText} from 'shared/src';
import {SkeletonThumbnail, SkeletonDisplayText} from 'shared';

import {TokenBaseStyle, TokenBaseIcon, TokenBaseText} from './style';

Expand Down
3 changes: 1 addition & 2 deletions packages/tokengate/src/fixtures/Condition.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {deepMerge} from 'shared/src/utils/deepMerge';
import {DeepPartial} from 'shared/src/types/deepPartial';
import {deepMerge, DeepPartial} from 'shared';

import {Condition} from '../types';

Expand Down
3 changes: 1 addition & 2 deletions packages/tokengate/src/fixtures/Reaction.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {deepMerge} from 'shared/src/utils/deepMerge';
import {DeepPartial} from 'shared/src/types/deepPartial';
import {deepMerge, DeepPartial} from 'shared';

import {Reaction} from '../types';

Expand Down
3 changes: 1 addition & 2 deletions packages/tokengate/src/fixtures/Requirements.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {deepMerge} from 'shared/src/utils/deepMerge';
import {DeepPartial} from 'shared/src/types/deepPartial';
import {deepMerge, DeepPartial} from 'shared';

import {Requirements} from '../types';

Expand Down
3 changes: 1 addition & 2 deletions packages/tokengate/src/fixtures/UnlockingToken.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {deepMerge} from 'shared/src/utils/deepMerge';
import {DeepPartial} from 'shared/src/types/deepPartial';
import {deepMerge, DeepPartial} from 'shared';

import {UnlockingToken} from '../types';

Expand Down
5 changes: 4 additions & 1 deletion packages/tokengate/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"compilerOptions": {
"baseUrl": "."
"baseUrl": ".",
"paths": {
"shared": ["../shared/src/index.ts"]
}
},
"include": ["./src", "./styled.d.ts"],
"exclude": ["./dist", "node_modules"],
Expand Down