Skip to content

Commit 9bccf6c

Browse files
authored
Dependency updates (#2326)
* Update sewing-kit to latest Fix linting issues raised by update to new version of eslint-plugin-shopify * Update Storybook
1 parent 6e43f48 commit 9bccf6c

File tree

29 files changed

+1432
-1253
lines changed

29 files changed

+1432
-1253
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
],
1010
"settings": {
1111
"react": {
12-
"version": "16.3"
12+
"version": "16.8"
1313
}
1414
},
1515
"rules": {
1616
"func-style": "off",
1717
"no-process-env": "off",
1818
"no-warning-comments": "off",
1919
"no-negated-condition": "off",
20+
"no-console": "error",
2021
"consistent-return": "off",
2122
"match-default-export-name": "off",
2223
"jsx-use-translation-function": "off",

UNRELEASED.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
3030

3131
### Dependency upgrades
3232

33+
- Updated sewing-kit to v0.111.0 and storybook to v5.2.4 ([#2326](https://github.com/Shopify/polaris-react/pull/2326))
34+
3335
### Code quality
3436

3537
### Deprecations

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@
9494
"@percy/storybook": "^3.2.0",
9595
"@shopify/jest-dom-mocks": "^2.1.1",
9696
"@shopify/react-testing": "^1.7.8",
97-
"@shopify/sewing-kit": "^0.92.3",
98-
"@storybook/addon-a11y": "^5.2.1",
99-
"@storybook/addon-actions": "^5.2.1",
97+
"@shopify/sewing-kit": "^0.111.0",
98+
"@storybook/addon-a11y": "^5.2.4",
99+
"@storybook/addon-actions": "^5.2.4",
100100
"@storybook/addon-console": "^1.2.1",
101-
"@storybook/addon-contexts": "^5.2.1",
102-
"@storybook/addon-notes": "^5.2.1",
103-
"@storybook/addon-viewport": "^5.2.1",
104-
"@storybook/react": "^5.2.1",
105-
"@storybook/theming": "^5.2.1",
101+
"@storybook/addon-contexts": "^5.2.4",
102+
"@storybook/addon-notes": "^5.2.4",
103+
"@storybook/addon-viewport": "^5.2.4",
104+
"@storybook/react": "^5.2.4",
105+
"@storybook/theming": "^5.2.4",
106106
"@types/enzyme": "^3.10.3",
107107
"@types/enzyme-adapter-react-16": "^1.0.5",
108108
"@types/lodash": "^4.14.138",

scripts/new-version-pr-generator.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ The automatic branch creation for ${repository} failed. This can be due to many
113113
mkdir(sandbox);
114114

115115
const jobs = repositories.map((repository) => {
116+
// TODO work out how to keep eslint happy
117+
// SEE https://eslint.org/docs/rules/no-async-promise-executor
118+
// eslint-disable-next-line no-async-promise-executor
116119
return new Promise(async (resolve, reject) => {
117120
try {
118121
const repositoryDirectory = path.resolve(sandbox, repository);

scripts/utilities/retry.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ function sleep(ms) {
33
}
44

55
function retry(functionToTry, maxAttempts = 3, delay = 1000) {
6+
// TODO work out how to keep eslint happy
7+
// SEE https://eslint.org/docs/rules/no-async-promise-executor
8+
// eslint-disable-next-line no-async-promise-executor
69
return new Promise(async (resolve, reject) => {
710
let remainingAttempts = maxAttempts;
811
while (remainingAttempts > 0) {

sewing-kit.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ export default function sewingKitConfig(
1919
plugins.jest((config: InitialOptions) => {
2020
config.roots = [join(__dirname, 'src'), join(__dirname, 'tests')];
2121

22-
config.setupFiles.push(join(tests, 'setup.ts'));
23-
config.setupFilesAfterEnv = [join(tests, 'each-test.ts')];
24-
2522
// Code coverage
2623
config.collectCoverageFrom = [
2724
'src/**/*.{ts,tsx}',

src/components/AppProvider/tests/AppProvider.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ describe('<AppProvider />', () => {
1717

1818
it('updates context when props change', () => {
1919
const Child: React.SFC<{}> = () => {
20-
// eslint-disable-next-line shopify/jest/no-if
2120
return useContext(LinkContext) ? <div id="child" /> : null;
2221
};
2322
const LinkComponent = () => <div />;

src/components/Autocomplete/tests/Autocomplete.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {CirclePlusMinor} from '@shopify/polaris-icons';
33
import {mountWithAppProvider, trigger} from 'test-utilities/legacy';
44
import {Spinner} from 'components';
55
import {Key} from '../../../types';
6-
import {Autocomplete} from '..';
76
import {ComboBox} from '../components';
7+
import {Autocomplete} from '..';
88

99
describe('<Autocomplete/>', () => {
1010
const options = [

src/components/Banner/tests/Banner.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {ReactWrapper} from 'enzyme';
1111
import {mountWithAppProvider} from 'test-utilities/legacy';
1212
import {BannerContext} from 'utilities/banner-context';
1313
import {Button, Icon, UnstyledLink, Heading} from 'components';
14-
import {Banner} from '..';
1514
import {WithinContentContext} from '../../../utilities/within-content-context';
15+
import {Banner} from '..';
1616

1717
describe('<Banner />', () => {
1818
it('renders a title', () => {
@@ -156,7 +156,6 @@ describe('<Banner />', () => {
156156
return (
157157
<BannerContext.Consumer>
158158
{(BannerContext) => {
159-
// eslint-disable-next-line shopify/jest/no-if
160159
return BannerContext ? <div /> : null;
161160
}}
162161
</BannerContext.Consumer>

src/components/DropZone/tests/DropZone.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ describe('<DropZone />', () => {
360360
<DropZone type="image">
361361
<DropZoneContext.Consumer>
362362
{(ctx) => {
363-
// eslint-disable-next-line shopify/jest/no-if
364363
return type === ctx.type ? <div /> : null;
365364
}}
366365
</DropZoneContext.Consumer>

0 commit comments

Comments
 (0)