Skip to content

Commit

Permalink
Update zent to 9.0.0-beta.24 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpylua authored Dec 10, 2020
1 parent af3cada commit 4bb2bce
Show file tree
Hide file tree
Showing 29 changed files with 436 additions and 209 deletions.
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/cascader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Simulate } from 'react-dom/test-utils';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Cascader from 'cascader';

Enzyme.configure({ adapter: new Adapter() });
Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/date-range-quick-picker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import DateRangeQuickPicker from 'date-range-quick-picker';

Enzyme.configure({ adapter: new Adapter() });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import formatDate from 'zent/es/utils/date/formatDate';
import DatePicker from 'datetimepicker/DatePicker';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import DateRangePicker from 'datetimepicker/DateRangePicker';
import isArray from 'lodash/isArray';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import MonthPicker from 'datetimepicker/MonthPicker';
import formatDate from 'zent/es/utils/date/formatDate';
Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/form/CreateForm-Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import noop from 'lodash/noop';
import omit from 'lodash/omit';
import PropTypes from 'prop-types';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import ZentForm from 'form';

Enzyme.configure({ adapter: new Adapter() });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import ZentForm from 'form';

Enzyme.configure({ adapter: new Adapter() });
Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/form/CreateForm-Fieldset.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import omit from 'lodash/omit';
import ZentForm from 'form';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import ZentForm from 'form';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import ZentForm from 'form';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/form/Form.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Enzyme, { shallow } from 'enzyme';
import ZentForm from 'form';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Enzyme, { mount } from 'enzyme';
import omit from 'lodash/omit';
import ZentForm from 'form';
import Option from 'select';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/pop.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import { Simulate } from 'react-dom/test-utils';
import Pop from 'pop';
import Button from 'zent/es/button';
Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/popover.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Simulate } from 'react-dom/test-utils';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Button from 'zent/es/button';
import Popover from 'popover';

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/select.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount, ReactWrapper } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import { Select as I18nDefault } from 'i18n/default';
import Select, { Option } from 'select';
Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/batch-components.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import BatchComponents from './comp/batch-components';

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/combine.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import { Button } from 'zent';
import Combine from './comp/combine';

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/expand.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import Expand from './comp/expand';

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/loading.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import Loading from './comp/loading';

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/modules.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Table from 'table';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import datasets from './comp/data/conf';
import TextComponent from './comp/components/Text';
Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/simple.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import Simple from './comp/simple';

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/single-select.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';

import SingleSelect from './comp/single-select';

Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/__tests__/table/table.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Table from 'table';

import datasets from './comp/data/conf';
Expand Down
24 changes: 13 additions & 11 deletions packages/zent-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zent/compat",
"version": "2.0.0-beta6",
"version": "2.0.0-beta.7",
"description": "一套前端设计语言和基于React的实现",
"bugs": "https://github.com/zent-contrib/zent-compat/issues",
"repository": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"classnames": "^2.2.6",
"date-fns": "^2.15.0",
"lodash-es": "^4.17.11",
"react-is": "^16.8.1",
"react-is": "^17.0.1",
"sortablejs": "~1.12.0",
"tslib": "^2.0.0",
"utility-types": "^3.4.1",
Expand All @@ -44,30 +44,32 @@
"@types/classnames": "^2.2.7",
"@types/jest": "^24.0.17",
"@types/lodash-es": "^4.17.1",
"@types/react-dom": "^16.8.2",
"@types/react-is": "^16.7.1",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-is": "^17.0.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.3.1",
"autoprefixer": "^9.6.1",
"babel-plugin-zent": "^2.2.2",
"banned-import-paths-tslint-rule": "^1.0.4",
"camelcase": "^5.2.0",
"chalk": "^2.4.2",
"cssnano": "^4.1.10",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.7.0",
"enzyme": "^3.11.0",
"glob": "^7.1.6",
"jest": "^24.5.0",
"postcss-cli": "^6.1.3",
"react": "16.11.x",
"react-dom": "16.11.x",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"sass": "^1.22.7",
"ts-jest": "^24.0.0",
"ts-node": "^8.0.3",
"tslint": "^5.14.0",
"typescript": "~3.9.7",
"zent": "9.0.0-beta13"
"typescript": "~4.1.2",
"zent": "9.0.0-beta.24"
},
"peerDependencies": {
"@types/react": "^16.8.7",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"zent": ">=9.0.0"
}
}
13 changes: 11 additions & 2 deletions packages/zent-compat/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,19 @@ echo "Compile styles..."
node $basepath/./compile-style.js

# autoprefixer
postcss css --use autoprefixer --replace --no-map
postcss \
css \
--use 'zent/plugins/postcss-plugin-constants' \
--use autoprefixer \
--replace \
--no-map

# minify index.css
postcss css/index.css --use cssnano --no-map -o css/index.min.css
postcss \
css/index.css \
--use cssnano \
--no-map \
-o css/index.min.css

echo "Compile esm..."
tsc
Expand Down
2 changes: 1 addition & 1 deletion packages/zent-compat/src/upload/components/UploadLocal.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import isPromise from 'zent/es/utils/isPromise';

export default function uploadLocalImage(options, uploadConfig) {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const { onUpload } = options;

if (typeof onUpload !== 'function') {
Expand Down
5 changes: 4 additions & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* eslint-disable global-require */

module.exports = {
plugins: [require('autoprefixer')()],
plugins: [
require('zent/plugins/postcss-plugin-constants')(),
require('autoprefixer')(),
],
};
8 changes: 4 additions & 4 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"prettier": "^1.15.2",
"prismjs": "1.21.0",
"prop-types": "^15.6.0",
"react": "16.11.x",
"react": "^17.0.1",
"react-beautiful-dnd": "^10.0.4",
"react-dom": "16.11.x",
"react-dom": "^17.0.1",
"react-loadable": "^5.3.0",
"react-router-dom": "^4.1.1",
"transliteration": "^1.6.2"
Expand Down Expand Up @@ -74,14 +74,14 @@
"postcss-loader": "^3.0.0",
"progress-bar-webpack-plugin": "^1.11.0",
"ramda": "^0.25.0",
"react-hot-loader": "^4.6.3",
"react-hot-loader": "^4.13.0",
"react-markdown-doc-loader": "^3.0.2",
"sass": "^1.22.7",
"sass-lint": "^1.12.1",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"thread-loader": "^2.1.2",
"typescript": "~3.9.7",
"typescript": "~4.1.2",
"url-loader": "^1.1.2",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
Expand Down
Loading

0 comments on commit 4bb2bce

Please sign in to comment.