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

update react dependency to 17.0.2 #1723

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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 .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v17.1.0
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "none",
"singleQuote": true,
"arrowParens": "avoid"
}
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
language: node_js

node_js:
- "7"
- "6"
- "17"
- "16"

cache:
yarn: true

branches:
only:
- master
- develop
- master
- develop
except:
- gh-pages-src
- gh-pages-src

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s
Expand Down
4 changes: 2 additions & 2 deletions enzyme-setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Adapter from 'enzyme-adapter-react-16.3';
import { configure } from 'enzyme';
import Adapter from "@wojtekmaj/enzyme-adapter-react-17";
import { configure } from "enzyme";

const configureEnzyme = () => {
configure({ adapter: new Adapter() });
Expand Down
125 changes: 75 additions & 50 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
import gulp from 'gulp';
import babel from 'gulp-babel';
import sass from 'gulp-sass';
import cleanCSS from 'gulp-clean-css';
import cleanDir from 'gulp-clean';
import rename from 'gulp-rename';
import shell from 'gulp-shell';
import gulp from "gulp";
import babel from "gulp-babel";
import gulpSass from "gulp-sass";
import dartSass from "sass";
import cleanCSS from "gulp-clean-css";
import cleanDir from "gulp-clean";
import rename from "gulp-rename";
import shell from "gulp-shell";

const LIB = 'lib';
const DIST = 'dist';
const TEST = 'test';
const PKG_PATH = './packages';
const NODE_MODULES = 'node_modules';
const sass = gulpSass(dartSass);
const LIB = "lib";
const DIST = "dist";
const TEST = "test";
const PKG_PATH = "./packages";
const NODE_MODULES = "node_modules";

const JS_PKGS = [
'react-bootstrap-table2',
'react-bootstrap-table2-editor',
'react-bootstrap-table2-filter',
'react-bootstrap-table2-overlay',
'react-bootstrap-table2-paginator',
'react-bootstrap-table2-toolkit'
].reduce((pkg, curr) => `${curr}|${pkg}`, '');
"react-bootstrap-table2",
"react-bootstrap-table2-editor",
"react-bootstrap-table2-filter",
"react-bootstrap-table2-overlay",
"react-bootstrap-table2-paginator",
"react-bootstrap-table2-toolkit",
].reduce((pkg, curr) => `${curr}|${pkg}`, "");

const JS_SKIPS = `+(${TEST}|${LIB}|${DIST}|${NODE_MODULES})`;

const STYLE_PKGS = [
'react-bootstrap-table2',
'react-bootstrap-table2-filter',
'react-bootstrap-table2-paginator',
'react-bootstrap-table2-toolkit',
].reduce((pkg, curr) => `${curr}|${pkg}`, '');
"react-bootstrap-table2",
"react-bootstrap-table2-filter",
"react-bootstrap-table2-paginator",
"react-bootstrap-table2-toolkit",
].reduce((pkg, curr) => `${curr}|${pkg}`, "");

const STYLE_SKIPS = `+(${NODE_MODULES})`;


function clean() {
return gulp
.src(`./packages/+(${JS_PKGS})/+(${LIB}|${DIST})`, { allowEmpty: true })
Expand All @@ -43,45 +44,69 @@ function scripts() {
return gulp
.src([
`./packages/+(${JS_PKGS})/**/*.js`,
`!packages/+(${JS_PKGS})/${JS_SKIPS}/**/*.js`
`!packages/+(${JS_PKGS})/${JS_SKIPS}/**/*.js`,
])
.pipe(babel())
.pipe(rename((path) => {
if (path.dirname.indexOf('src') > -1) {
path.dirname = path.dirname.replace('src', `${LIB}/src`);
} else {
path.dirname += `/${LIB}`;
}
}))
.pipe(
rename((path) => {
if (path.dirname.indexOf("src") > -1) {
path.dirname = path.dirname.replace("src", `${LIB}/src`);
} else {
path.dirname += `/${LIB}`;
}
})
)
.pipe(gulp.dest(PKG_PATH));
}

function styles() {
return gulp
.src([
`./packages/+(${STYLE_PKGS})/style/**/*.scss`,
`!packages/+(${STYLE_PKGS})/${STYLE_SKIPS}/**/*.scss`
`!packages/+(${STYLE_PKGS})/${STYLE_SKIPS}/**/*.scss`,
])
.pipe(sass().on('error', sass.logError))
.pipe(rename((path) => {
path.dirname = path.dirname.replace('style', DIST);
}))
.pipe(sass().on("error", sass.logError))
.pipe(
rename((path) => {
path.dirname = path.dirname.replace("style", DIST);
})
)
.pipe(gulp.dest(PKG_PATH))
.pipe(cleanCSS({ compatibility: 'ie8' }))
.pipe(rename((path) => {
path.extname = '.min.css';
}))
.pipe(cleanCSS({ compatibility: "ie8" }))
.pipe(
rename((path) => {
path.extname = ".min.css";
})
)
.pipe(gulp.dest(PKG_PATH));
}

function umd(done) {
gulp.parallel(
() => gulp.src('./webpack/next.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])),
() => gulp.src('./webpack/editor.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])),
() => gulp.src('./webpack/filter.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])),
() => gulp.src('./webpack/overlay.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])),
() => gulp.src('./webpack/paginator.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>'])),
() => gulp.src('./webpack/toolkit.umd.babel.js').pipe(shell(['webpack --config <%= file.path %>']))
() =>
gulp
.src("./webpack/next.umd.babel.js")
.pipe(shell(["webpack --config <%= file.path %>"])),
() =>
gulp
.src("./webpack/editor.umd.babel.js")
.pipe(shell(["webpack --config <%= file.path %>"])),
() =>
gulp
.src("./webpack/filter.umd.babel.js")
.pipe(shell(["webpack --config <%= file.path %>"])),
() =>
gulp
.src("./webpack/overlay.umd.babel.js")
.pipe(shell(["webpack --config <%= file.path %>"])),
() =>
gulp
.src("./webpack/paginator.umd.babel.js")
.pipe(shell(["webpack --config <%= file.path %>"])),
() =>
gulp
.src("./webpack/toolkit.umd.babel.js")
.pipe(shell(["webpack --config <%= file.path %>"]))
)();
done();
}
Expand All @@ -90,5 +115,5 @@ const buildJS = gulp.parallel(umd, scripts);
const buildCSS = styles;
const build = gulp.series(clean, gulp.parallel(buildJS, buildCSS));

gulp.task('prod', build);
gulp.task('default', build);
gulp.task("prod", build);
gulp.task("default", build);
7 changes: 3 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"lerna": "2.0.0",
"packages": [
"packages/*"
],
"version": "independent"
"packages": ["packages/*"],
"version": "independent",
"npmClient": "yarn"
}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
},
"homepage": "https://github.com/react-bootstrap-table/react-bootstrap-table2#readme",
"devDependencies": {
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
"babel-cli": "6.26.0",
"babel-core": "6.25.0",
"babel-eslint": "7.2.3",
Expand All @@ -51,7 +52,6 @@
"babel-register": "6.24.1",
"css-loader": "0.28.1",
"enzyme": "3.4.0",
"enzyme-adapter-react-16.3": "1.0.0",
"enzyme-to-json": "3.3.4",
"eslint": "4.5.0",
"eslint-config-airbnb": "15.1.0",
Expand All @@ -64,26 +64,26 @@
"gulp-clean": "0.4.0",
"gulp-clean-css": "3.9.2",
"gulp-rename": "^1.2.2",
"gulp-sass": "3.1.0",
"gulp-sass": "5.1.0",
"gulp-shell": "0.6.5",
"html-webpack-plugin": "2.30.1",
"jest": "20.0.4",
"jsdom": "11.2.0",
"jsdom-global": "3.0.2",
"lerna": "2.8.0",
"node-sass": "4.5.3",
"lerna": "4.0.0",
"sass": "^1.49.9",
"react-test-renderer": "16.0.0",
"sass-loader": "6.0.6",
"sass-loader": "^9.0.3",
"sinon": "3.2.1",
"style-loader": "0.17.0",
"webpack": "3.5.4",
"webpack": "4.41.2",
"webpack-dev-server": "2.7.1"
},
"dependencies": {
"classnames": "^2.2.5",
"prop-types": "15.5.10",
"react": "16.4.0",
"react-dom": "16.4.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"underscore": "1.9.1"
},
"jest": {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-bootstrap-table2-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-table2-editor",
"version": "1.4.0",
"version": "1.5.0",
"description": "it's the editor addon for react-bootstrap-table2",
"main": "./lib/index.js",
"scripts": {
Expand Down Expand Up @@ -41,7 +41,7 @@
],
"peerDependencies": {
"prop-types": "^15.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
6 changes: 3 additions & 3 deletions packages/react-bootstrap-table2-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-table2-example",
"version": "1.0.41",
"version": "1.1.0",
"description": "",
"main": "index.js",
"private": true,
Expand All @@ -14,8 +14,8 @@
"license": "ISC",
"peerDependencies": {
"prop-types": "^15.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@storybook/addon-console": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/react-bootstrap-table2-filter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-table2-filter",
"version": "1.3.3",
"version": "1.4.0",
"description": "it's a column filter addon for react-bootstrap-table2",
"main": "./lib/index.js",
"repository": {
Expand Down Expand Up @@ -38,7 +38,7 @@
],
"peerDependencies": {
"prop-types": "^15.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
6 changes: 3 additions & 3 deletions packages/react-bootstrap-table2-overlay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-table2-overlay",
"version": "2.0.0",
"version": "2.1.0",
"description": "it's a loading overlay addons for react-bootstrap-table2",
"main": "./lib/index.js",
"repository": {
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"peerDependencies": {
"prop-types": "^15.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
6 changes: 3 additions & 3 deletions packages/react-bootstrap-table2-paginator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-table2-paginator",
"version": "2.1.2",
"version": "2.2.0",
"description": "it's the pagination addon for react-bootstrap-table2",
"main": "./lib/index.js",
"repository": {
Expand Down Expand Up @@ -38,7 +38,7 @@
],
"peerDependencies": {
"prop-types": "^15.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
6 changes: 3 additions & 3 deletions packages/react-bootstrap-table2-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-table2-toolkit",
"version": "2.1.3",
"version": "2.2.0",
"description": "The toolkit for react-bootstrap-table2",
"main": "./lib/index.js",
"repository": {
Expand Down Expand Up @@ -41,8 +41,8 @@
],
"peerDependencies": {
"prop-types": "^15.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"dependencies": {
"file-saver": "2.0.2"
Expand Down
6 changes: 3 additions & 3 deletions packages/react-bootstrap-table2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-table-next",
"version": "4.0.3",
"version": "4.1.0",
"description": "Next generation of react-bootstrap-table",
"main": "./lib/index.js",
"repository": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"peerDependencies": {
"classnames": "^2.2.5",
"prop-types": "^15.0.0",
"react": "^16.3.0",
"react-dom": "^16.3.0"
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}
Loading