Skip to content

Commit 8700e57

Browse files
authored
chore: bump Babel & react-docgen (#4454)
1 parent 5646905 commit 8700e57

22 files changed

+1517
-1166
lines changed

.babel-preset.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ const browsers = [
1616
]
1717

1818
const plugins = [
19-
['@babel/plugin-proposal-class-properties', { loose: true }],
20-
['@babel/plugin-proposal-optional-chaining', { loose: true }],
2119
'@babel/plugin-proposal-export-default-from',
22-
'@babel/plugin-proposal-export-namespace-from',
2320
'@babel/plugin-syntax-dynamic-import',
2421
[
2522
'@babel/plugin-transform-runtime',

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ general:
55
ignore:
66
- gh-pages
77

8+
orbs:
9+
browser-tools: circleci/[email protected]
10+
811
docker_defaults: &docker_defaults
912
docker:
10-
- image: circleci/node:16-browsers
13+
- image: cimg/node:16.16-browsers
1114
working_directory: ~/project/semantic-ui-react
1215

1316
environment:
@@ -32,6 +35,7 @@ jobs:
3235
key: v6-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
3336
paths:
3437
- ~/.cache/yarn
38+
- browser-tools/install-chrome
3539
- persist_to_workspace:
3640
root: ~/
3741
paths:

gulp/plugins/gulp-component-menu.js renamed to gulp/plugins/gulp-component-menu.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Vinyl from 'vinyl'
22
import gutil from 'gulp-util'
33
import through from 'through2'
44

5-
import getComponentInfo from './util/getComponentInfo'
5+
import getComponentInfo from './util/getComponentInfo.mjs'
66

77
const pluginName = 'gulp-component-menu'
88

gulp/plugins/gulp-example-menu.js renamed to gulp/plugins/gulp-example-menu.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import _ from 'lodash'
44
import path from 'path'
55
import through from 'through2'
66

7-
import { parseDocSection } from './util'
7+
import parseDocSection from './util/parseDocSection.mjs'
88

99
const SECTION_ORDER = {
1010
Types: 1,

gulp/plugins/gulp-react-docgen.js renamed to gulp/plugins/gulp-react-docgen.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Vinyl from 'vinyl'
22
import gutil from 'gulp-util'
33
import through from 'through2'
44

5-
import { getComponentInfo } from './util'
5+
import getComponentInfo from './util/getComponentInfo.mjs'
66

77
const pluginName = 'gulp-react-docgen'
88

gulp/plugins/util/getComponentInfo.js renamed to gulp/plugins/util/getComponentInfo.mjs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import _ from 'lodash'
22
import path from 'path'
3-
import { defaultHandlers, parse, resolver } from 'react-docgen'
3+
import { builtinResolvers, defaultHandlers, parse } from 'react-docgen'
44
import fs from 'fs'
55

6-
import config from '../../../config'
7-
import parseDefaultValue from './parseDefaultValue'
8-
import parseDocblock from './parseDocblock'
9-
import parserCustomHandler from './parserCustomHandler'
10-
import parseType from './parseType'
6+
import parseDefaultValue from './parseDefaultValue.mjs'
7+
import parseDocblock from './parseDocblock.mjs'
8+
import parserCustomHandler from './parserCustomHandler.mjs'
9+
import parseType from './parseType.mjs'
10+
11+
const config = (await import('../../../config.js')).default
1112

1213
const getComponentInfo = (filepath) => {
1314
const absPath = path.resolve(process.cwd(), filepath)
@@ -24,10 +25,11 @@ const getComponentInfo = (filepath) => {
2425
const componentType = path.basename(path.dirname(dir)).replace(/s$/, '')
2526

2627
// start with react-docgen info
27-
const components = parse(contents, resolver.findAllComponentDefinitions, [
28-
...defaultHandlers,
29-
parserCustomHandler,
30-
])
28+
const resolver = new builtinResolvers.FindAllDefinitionsResolver()
29+
const components = parse(contents, {
30+
resolver,
31+
handlers: [...defaultHandlers, parserCustomHandler],
32+
})
3133

3234
if (!components.length) {
3335
throw new Error(`Could not find a component definition in "${filepath}".`)

gulp/plugins/util/index.js

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)