Skip to content

Commit ef2b299

Browse files
author
Luke Bowerman
authored
fix: Use /lib in deep-import for Icons to correct build portability (#2143)
1 parent fcfdb4d commit ef2b299

File tree

27 files changed

+41
-45
lines changed

27 files changed

+41
-45
lines changed

babel.config.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const ignore = [
3434
'**/stories/*',
3535
'__snapshots__',
3636
'__tests__',
37+
'__mocks__',
3738
]
3839

3940
const plugins = [
@@ -58,11 +59,8 @@ module.exports = (api) => {
5859
[
5960
'@babel/env',
6061
{
61-
corejs: 3,
62-
targets: {
63-
node: 6,
64-
},
65-
useBuiltIns: 'usage',
62+
bugfixes: true,
63+
targets: { ie: '11' },
6664
},
6765
],
6866
...presets,
@@ -75,9 +73,9 @@ module.exports = (api) => {
7573
[
7674
'@babel/env',
7775
{
78-
corejs: 3,
76+
bugfixes: true,
7977
modules: false,
80-
useBuiltIns: 'usage',
78+
targets: { ie: '11' },
8179
},
8280
],
8381
...presets,

jest-image-snapshots.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ module.exports = {
3131
moduleFileExtensions: ['js', 'json', 'ts', 'tsx'],
3232
moduleNameMapper: {
3333
'@looker/([^/]+)$': '<rootDir>/packages/$1/src',
34-
// Deep imports (e.g. icons)
35-
'@looker/([^/]+)/src/(.+)$': '<rootDir>/packages/$1/src/$2',
3634
'\\.(css)$': '<rootDir>/config/jest/styleMock.js',
3735
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)$':
3836
'<rootDir>/config/jest/fileMock.js',

jest.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ module.exports = {
3333
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
3434
moduleNameMapper: {
3535
'@looker/([^/]+)$': '<rootDir>/packages/$1/src',
36-
// Deep imports (e.g. icons)
37-
'@looker/([^/]+)/src/(.+)$': '<rootDir>/packages/$1/src/$2',
3836
'\\.(css)$': '<rootDir>/config/jest/styleMock.js',
3937
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
4038
'<rootDir>/config/jest/fileMock.js',

packages/components-theme-editor/src/ThemeEditor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
*/
2626

27-
import { Beaker } from '@looker/icons/src/Beaker'
27+
import { Beaker } from '@looker/icons/lib/Beaker'
2828
import { IconButton, Dialog } from '@looker/components'
2929
import React, { FC } from 'react'
3030
import {

packages/components/src/Avatar/Avatar.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
import { renderWithTheme } from '@looker/components-test-utils'
28-
import { Account } from '@looker/icons/src/Account'
28+
import { Account } from '@looker/icons/lib/Account'
2929
import { Code } from '@styled-icons/material/Code'
3030
import { screen, fireEvent } from '@testing-library/react'
3131
import React from 'react'

packages/components/src/Breakpoint/Breakpoint.story.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
*/
2626
import React, { FC } from 'react'
27-
import { LookerLogo } from '@looker/icons/src/LookerLogo'
27+
import { LookerLogo } from '@looker/icons/lib/LookerLogo'
2828
import { Story } from '@storybook/react/types-6-0'
2929
import {
3030
SpaceProps,

packages/components/src/DataTable/stories/State.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
*/
2626

27-
import { Beaker } from '@looker/icons/src/Beaker'
27+
import { Beaker } from '@looker/icons/lib/Beaker'
2828
import { Story } from '@storybook/react/types-6-0'
2929
import React from 'react'
3030
import { Icon } from '../../Icon'

packages/components/src/Form/Fields/FieldText/FieldText.story.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
2525
*/
2626

27-
import { Account } from '@looker/icons/src/Account'
27+
import { Account } from '@looker/icons/lib/Account'
2828
import { Story } from '@storybook/react/types-6-0'
2929
import { AddAlert } from '@styled-icons/material/AddAlert'
3030
import { Favorite } from '@styled-icons/material/Favorite'

packages/components/src/Form/Inputs/InputText/InputText.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import { screen } from '@testing-library/react'
2828
import userEvent from '@testing-library/user-event'
2929
import { renderWithTheme } from '@looker/components-test-utils'
30-
import { Account } from '@looker/icons/src/Account'
30+
import { Account } from '@looker/icons/lib/Account'
3131
import { Favorite } from '@styled-icons/material/Favorite'
3232
import React from 'react'
3333

packages/components/src/Form/Inputs/Select/Select.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
getAllComboboxOptionText,
2929
renderWithTheme,
3030
} from '@looker/components-test-utils'
31-
import { ChartBar } from '@looker/icons/src/ChartBar'
31+
import { ChartBar } from '@looker/icons/lib/ChartBar'
3232
import { BarChart } from '@styled-icons/material/BarChart'
3333
import { fireEvent, screen } from '@testing-library/react'
3434
import React, { useState, useMemo, useEffect } from 'react'

0 commit comments

Comments
 (0)