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

chore: bump dev dependencies #1955

Merged
merged 2 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module.exports = {
'react/prop-types': OFF,
'react/destructuring-assignment': OFF, // Too many lines.
'react/prefer-stateless-function': WARNING,
'react/jsx-props-no-spreading': OFF,
'react-hooks/rules-of-hooks': ERROR,
},
};
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@ module.exports = {
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-nullish-coalescing-operator',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise jest won't be able to handle TS 3.7 nullish and optional chaining later on. (babel-preset-typescript doesnt include that)

'@babel/plugin-proposal-optional-chaining',
],
};
31 changes: 14 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
},
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/preset-typescript": "^7.7.2",
"@types/cross-spawn": "^6.0.1",
"@types/express": "^4.17.1",
Expand All @@ -41,30 +43,25 @@
"@types/webpack": "^4.32.0",
"@types/webpack-dev-server": "^3.1.5",
"@types/webpack-merge": "^4.1.5",
"babel-eslint": "8",
"enzyme": "^3.9.0",
"enzyme-adapter-react-16": "^1.12.1",
"eslint": "4.x",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "^2.9.0",
"babel-eslint": "^10.0.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know why its been so long since last bump :o

"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"eslint": "^6.6.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-react-hooks": "^0.0.0",
"filepath": "^1.1.0",
"front-matter": "^2.3.0",
"glob-promise": "^3.3.0",
"husky": "^1.3.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "^2.2.0",
"husky": "^3.0.9",
"jest": "^24.9.0",
"lerna": "^3.18.1",
"lerna-changelog": "^0.8.2",
"lint-staged": "^7.2.0",
"picomatch": "^2.1.0",
"prettier": "^1.18.2",
"prettier": "^1.19.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS 3.7 support

"react": "^16.8.4",
"react-dom": "^16.8.4",
"rimraf": "^2.6.3",
"typescript": "^3.7.2"
},
"lint-staged": {
Expand Down
4 changes: 4 additions & 0 deletions packages/docusaurus-1.x/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ module.exports = {
'react/button-has-type': OFF, // 1
'react/forbid-prop-types': OFF, // 1
'react/require-default-props': OFF, // 1
'jsx-a11y/control-has-associated-label': OFF, // 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the eslint plugins are updated and stricter. So turning it off

'react/jsx-props-no-spreading': OFF, // 2
'max-classes-per-file': OFF, // 2
'prefer-object-spread': OFF, // 5
'jsx-a11y/anchor-is-valid': OFF, // 9
'import/no-unresolved': OFF, // 15
'react/prefer-stateless-function': OFF, // 22
Expand Down
4 changes: 1 addition & 3 deletions packages/docusaurus-1.x/lib/server/readMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,7 @@ function generateMetadataBlog(config = siteConfig) {
// Extract, YYYY, MM, DD from the file name
const filePathDateArr = path.basename(file).split('-');
metadata.date = new Date(
`${filePathDateArr[0]}-${filePathDateArr[1]}-${
filePathDateArr[2]
}T06:00:00.000Z`,
`${filePathDateArr[0]}-${filePathDateArr[1]}-${filePathDateArr[2]}T06:00:00.000Z`,
);
// allow easier sorting of blog by providing seconds since epoch
metadata.seconds = Math.round(metadata.date.getTime() / 1000);
Expand Down
6 changes: 6 additions & 0 deletions packages/docusaurus-1.x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,11 @@
"tiny-lr": "^1.1.1",
"tree-node-cli": "^1.2.5",
"truncate-html": "^1.0.3"
},
"devDependencies": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this is specific to v1 only

"filepath": "^1.1.0",
"front-matter": "^2.3.0",
"glob-promise": "^3.3.0",
"rimraf": "^2.6.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ describe('loadBlog', () => {
);
const {blogPosts} = await plugin.loadContent();
const noDateSource = path.join('@site', pluginPath, 'no date.md');
const noDateSourceBirthTime = (await fs.stat(
noDateSource.replace('@site', siteDir),
)).birthtime;
const noDateSourceBirthTime = (
await fs.stat(noDateSource.replace('@site', siteDir))
).birthtime;
const noDatePermalink = `/blog/${noDateSourceBirthTime
.toISOString()
.substr(0, '2019-01-01'.length)
Expand Down
3 changes: 2 additions & 1 deletion packages/docusaurus-plugin-content-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"license": "MIT",
"devDependencies": {
"@docusaurus/types": "^2.0.0-alpha.33"
"@docusaurus/types": "^2.0.0-alpha.33",
"picomatch": "^2.1.0"
},
"dependencies": {
"@docusaurus/mdx-loader": "^2.0.0-alpha.33",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ describe('createOrder', () => {
{
type: 'category',
label: 'Category2',
items: [{type: 'doc', id: 'doc3'}, {type: 'doc', id: 'doc4'}],
items: [
{type: 'doc', id: 'doc3'},
{type: 'doc', id: 'doc4'},
],
},
],
otherDocs: [
Expand Down Expand Up @@ -75,12 +78,18 @@ describe('createOrder', () => {
{
type: 'category',
label: 'Category1',
items: [{type: 'doc', id: 'doc1'}, {type: 'doc', id: 'doc2'}],
items: [
{type: 'doc', id: 'doc1'},
{type: 'doc', id: 'doc2'},
],
},
{
type: 'category',
label: 'Category2',
items: [{type: 'doc', id: 'doc3'}, {type: 'doc', id: 'doc4'}],
items: [
{type: 'doc', id: 'doc3'},
{type: 'doc', id: 'doc4'},
],
},
],
otherDocs: [
Expand Down Expand Up @@ -188,7 +197,10 @@ describe('createOrder', () => {
{
type: 'category',
label: 'Category2',
items: [{type: 'doc', id: 'doc3'}, {type: 'ref', id: 'doc4'}],
items: [
{type: 'doc', id: 'doc3'},
{type: 'ref', id: 'doc4'},
],
},
],
otherDocs: [
Expand Down Expand Up @@ -225,7 +237,10 @@ describe('createOrder', () => {
{
type: 'category',
label: 'Category1',
items: [{type: 'endi', id: 'doc1'}, {type: 'doc', id: 'doc2'}],
items: [
{type: 'endi', id: 'doc1'},
{type: 'doc', id: 'doc2'},
],
},
],
otherDocs: [
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-classic/src/theme/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Layout(props) {
const metaImageUrl = siteUrl + useBaseUrl(metaImage);
const faviconUrl = useBaseUrl(favicon);
return (
<React.Fragment>
<>
<Head>
<meta charSet="utf-8" />
<meta httpEquiv="x-ua-compatible" content="ie=edge" />
Expand All @@ -63,7 +63,7 @@ function Layout(props) {
<Navbar />
<main className="main">{children}</main>
{!noFooter && <Footer />}
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-theme-classic/src/theme/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function Navbar() {

const logoUrl = useBaseUrl(logo.src);
return (
<React.Fragment>
<>
<Head>
{/* TODO: Do not assume that it is in english language */}
<html lang="en" data-theme={theme} />
Expand Down Expand Up @@ -187,7 +187,7 @@ function Navbar() {
</div>
</div>
</nav>
</React.Fragment>
</>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const Search = props => {
return isEnabled ? (
<div className="navbar__search" key="search-box">
<span
aria-label="expand searchbar"
role="button"
className={classnames('search-icon', {
'search-icon-hidden': props.isSearchBarExpanded,
Expand Down
6 changes: 4 additions & 2 deletions packages/docusaurus-types/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ export interface DocusaurusConfig {
| {
src: string;
[key: string]: any;
})[];
}
)[];
stylesheets?: (
| string
| {
href: string;
[key: string]: any;
})[];
}
)[];
}

export interface DocusaurusContext {
Expand Down
5 changes: 1 addition & 4 deletions packages/docusaurus-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ export function genComponentName(pagePath: string): string {
return 'index';
}
const pageHash = docuHash(pagePath);
const pascalCase = _.flow(
_.camelCase,
_.upperFirst,
);
const pascalCase = _.flow(_.camelCase, _.upperFirst);
return pascalCase(pageHash);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus/src/client/theme-fallback/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Layout(props) {
const {children, title, description} = props;
const faviconUrl = useBaseUrl(favicon);
return (
<React.Fragment>
<>
<Head defaultTitle={`${defaultTitle} · ${tagline}`}>
{title && <title>{`${title} · ${tagline}`}</title>}
{favicon && <link rel="shortcut icon" href={faviconUrl} />}
Expand All @@ -27,7 +27,7 @@ function Layout(props) {
)}
</Head>
{children}
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus/src/server/presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export function loadPresets(
themes: PluginConfig[];
} {
const presets: PresetConfig[] = (context.siteConfig || {}).presets || [];
const unflatPlugins: (PluginConfig[])[] = [];
const unflatThemes: (PluginConfig[])[] = [];
const unflatPlugins: PluginConfig[][] = [];
const unflatThemes: PluginConfig[][] = [];

presets.forEach(presetItem => {
let presetModuleImport;
Expand Down
Loading