Merge pull request #363 from rtfpessoa/bump-dependencies
bump: Update dependencies
This commit is contained in:
commit
0475545a01
7 changed files with 2015 additions and 4005 deletions
|
|
@ -30,7 +30,7 @@ jobs:
|
|||
paths:
|
||||
- '*'
|
||||
|
||||
build-common: &common-build
|
||||
build-common: &build-common
|
||||
docker:
|
||||
- image: node
|
||||
working_directory: ~/workdir
|
||||
|
|
@ -51,9 +51,14 @@ jobs:
|
|||
key: yarn-cache-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- /usr/local/share/.cache/yarn
|
||||
- run: yarn run build:templates && yarn run build
|
||||
- run:
|
||||
name: Build templates
|
||||
command: yarn run build:templates
|
||||
- run:
|
||||
name: Build library
|
||||
command: yarn run build
|
||||
|
||||
build-latest: &latest-build
|
||||
build-stable: &build-stable
|
||||
docker:
|
||||
- image: node
|
||||
working_directory: ~/workdir
|
||||
|
|
@ -74,7 +79,9 @@ jobs:
|
|||
key: yarn-cache-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- /usr/local/share/.cache/yarn
|
||||
- run: yarn run validate
|
||||
- run:
|
||||
name: Validate & Build
|
||||
command: yarn run validate
|
||||
- store_artifacts:
|
||||
path: coverage
|
||||
- store_test_results:
|
||||
|
|
@ -85,18 +92,18 @@ jobs:
|
|||
paths:
|
||||
- '*'
|
||||
|
||||
build-node-10:
|
||||
<<: *common-build
|
||||
docker:
|
||||
- image: node:11
|
||||
|
||||
build-node-12:
|
||||
<<: *common-build
|
||||
<<: *build-common
|
||||
docker:
|
||||
- image: node:12
|
||||
|
||||
build-node-15:
|
||||
<<: *build-common
|
||||
docker:
|
||||
- image: node:15
|
||||
|
||||
build-node-14:
|
||||
<<: *latest-build
|
||||
<<: *build-stable
|
||||
docker:
|
||||
- image: node:14
|
||||
|
||||
|
|
@ -175,7 +182,7 @@ jobs:
|
|||
|
||||
publish_website:
|
||||
machine:
|
||||
enabled: true
|
||||
image: ubuntu-1604:202004-01
|
||||
working_directory: ~/workdir
|
||||
steps:
|
||||
- attach_workspace:
|
||||
|
|
@ -191,21 +198,21 @@ workflows:
|
|||
validate-and-publish:
|
||||
jobs:
|
||||
- checkout-and-version
|
||||
- build-node-10:
|
||||
requires:
|
||||
- checkout-and-version
|
||||
- build-node-12:
|
||||
requires:
|
||||
- checkout-and-version
|
||||
- build-node-14:
|
||||
requires:
|
||||
- checkout-and-version
|
||||
- build-node-15:
|
||||
requires:
|
||||
- checkout-and-version
|
||||
- publish_approval:
|
||||
type: approval
|
||||
requires:
|
||||
- build-node-10
|
||||
- build-node-12
|
||||
- build-node-14
|
||||
- build-node-15
|
||||
- tag_version:
|
||||
requires:
|
||||
- publish_approval
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ module.exports = {
|
|||
'plugin:jest/recommended',
|
||||
'plugin:jest/style',
|
||||
'prettier',
|
||||
'prettier/@typescript-eslint',
|
||||
'prettier/babel',
|
||||
],
|
||||
plugins: ['@typescript-eslint', 'json', 'promise', 'import', 'node', 'sonarjs', 'jest', 'optimize-regex'],
|
||||
rules: {
|
||||
|
|
|
|||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
_
|
||||
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn lint-staged
|
||||
102
package.json
102
package.json
|
|
@ -32,7 +32,7 @@
|
|||
"url": "https://www.github.com/rtfpessoa/diff2html/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"eslint": "eslint --ignore-path .gitignore \"**/*.{js,jsx,ts,tsx,json}\"",
|
||||
|
|
@ -44,10 +44,10 @@
|
|||
"build": "yarn run build:css && yarn run build:templates && yarn run build:es5 && yarn run build:esm && yarn run build:bundles && yarn run build:website",
|
||||
"build:es5": "rm -rf lib; tsc -p tsconfig.json --outDir lib",
|
||||
"build:esm": "rm -rf lib-esm; tsc -p tsconfig.json -m es6 --outDir lib-esm",
|
||||
"build:bundles": "rm -rf ./bundles/js; webpack ---display-reasons --display-modules --mode production --config webpack.bundles.ts",
|
||||
"build:bundles": "rm -rf ./bundles/js; webpack --mode production --config webpack.bundles.ts",
|
||||
"build:css": "rm -rf ./bundles/css; postcss --config ./postcss.config.js --no-map -o ./bundles/css/diff2html.min.css ./src/ui/css/diff2html.css",
|
||||
"build:templates": "ts-node ./scripts/hulk.ts --wrapper ts --variable 'defaultTemplates' ./src/templates/*.mustache > ./src/diff2html-templates.ts",
|
||||
"build:website": "rm -rf docs; webpack ---display-reasons --display-modules --mode production --config webpack.website.ts",
|
||||
"build:website": "rm -rf docs; webpack --mode production --config webpack.website.ts",
|
||||
"gen": "yarn run gen:toc",
|
||||
"gen:toc-base": "markdown-toc --maxdepth 3 --bullets='-' -i",
|
||||
"gen:toc": "yarn run gen:toc-base README.md",
|
||||
|
|
@ -62,16 +62,14 @@
|
|||
"start": "yarn run start:website",
|
||||
"start:website": "webpack-dev-server --mode development --config webpack.website.ts",
|
||||
"preversion": "yarn run validate",
|
||||
"version": "git add -A package.json"
|
||||
"version": "git add -A package.json",
|
||||
"postinstall": "husky install",
|
||||
"prepublishOnly": "pinst --disable",
|
||||
"postpublish": "pinst --enable"
|
||||
},
|
||||
"main": "./lib/diff2html.js",
|
||||
"module": "./lib-esm/diff2html.js",
|
||||
"types": "./lib/diff2html.d.ts",
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*.+(js|jsx|ts|tsx|json)": [
|
||||
"prettier --write",
|
||||
|
|
@ -85,68 +83,67 @@
|
|||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"diff": "4.0.2",
|
||||
"diff": "5.0.0",
|
||||
"hogan.js": "3.0.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"highlight.js": "10.4.1"
|
||||
"highlight.js": "10.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/clipboard": "2.0.1",
|
||||
"@types/copy-webpack-plugin": "6.0.0",
|
||||
"@types/diff": "4.0.2",
|
||||
"@types/copy-webpack-plugin": "6.4.1",
|
||||
"@types/diff": "5.0.0",
|
||||
"@types/hogan.js": "3.0.0",
|
||||
"@types/html-webpack-plugin": "3.2.3",
|
||||
"@types/jest": "26.0.14",
|
||||
"@types/mini-css-extract-plugin": "0.9.1",
|
||||
"@types/jest": "26.0.22",
|
||||
"@types/mini-css-extract-plugin": "^1.2.2",
|
||||
"@types/mkdirp": "1.0.1",
|
||||
"@types/node": "14.11.10",
|
||||
"@types/node": "14.14.37",
|
||||
"@types/nopt": "3.0.29",
|
||||
"@typescript-eslint/eslint-plugin": "4.4.1",
|
||||
"@typescript-eslint/parser": "4.4.1",
|
||||
"autoprefixer": "10.0.1",
|
||||
"bulma": "^0.9.0",
|
||||
"clipboard": "2.0.6",
|
||||
"copy-webpack-plugin": "6.1.0",
|
||||
"css-loader": "5.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.20.0",
|
||||
"@typescript-eslint/parser": "4.20.0",
|
||||
"autoprefixer": "10.2.5",
|
||||
"bulma": "^0.9.2",
|
||||
"clipboard": "2.0.8",
|
||||
"copy-webpack-plugin": "8.1.0",
|
||||
"css-loader": "5.2.0",
|
||||
"cssnano": "4.1.10",
|
||||
"eslint": "7.11.0",
|
||||
"eslint-config-prettier": "6.13.0",
|
||||
"eslint": "7.23.0",
|
||||
"eslint-config-prettier": "8.1.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eslint-plugin-jest": "24.1.0",
|
||||
"eslint-plugin-jest": "24.3.3",
|
||||
"eslint-plugin-json": "2.1.2",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-optimize-regex": "1.2.0",
|
||||
"eslint-plugin-promise": "4.2.1",
|
||||
"eslint-plugin-sonarjs": "0.5.0",
|
||||
"file-loader": "6.1.1",
|
||||
"handlebars": "4.7.6",
|
||||
"eslint-plugin-promise": "4.3.1",
|
||||
"eslint-plugin-sonarjs": "0.6.0",
|
||||
"file-loader": "6.2.0",
|
||||
"handlebars": "4.7.7",
|
||||
"handlebars-loader": "1.7.1",
|
||||
"html-webpack-plugin": "4.4.1",
|
||||
"husky": "4.3.0",
|
||||
"image-webpack-loader": "6.0.0",
|
||||
"is-ci-cli": "2.1.2",
|
||||
"jest": "26.5.3",
|
||||
"lint-staged": "10.4.1",
|
||||
"html-webpack-plugin": "5.3.1",
|
||||
"husky": "^6.0.0",
|
||||
"image-webpack-loader": "7.0.1",
|
||||
"is-ci-cli": "2.2.0",
|
||||
"jest": "26.6.3",
|
||||
"lint-staged": "10.5.4",
|
||||
"markdown-toc": "^1.2.0",
|
||||
"mini-css-extract-plugin": "0.11.0",
|
||||
"mini-css-extract-plugin": "1.4.0",
|
||||
"mkdirp": "1.0.4",
|
||||
"nopt": "5.0.0",
|
||||
"postcss": "8.1.1",
|
||||
"postcss-cli": "8.1.0",
|
||||
"postcss-import": "12.0.1",
|
||||
"postcss-loader": "4.0.4",
|
||||
"pinst": "^2.1.4",
|
||||
"postcss": "8.2.9",
|
||||
"postcss-cli": "8.3.1",
|
||||
"postcss-import": "14.0.1",
|
||||
"postcss-loader": "5.2.0",
|
||||
"postcss-preset-env": "6.7.0",
|
||||
"prettier": "2.1.2",
|
||||
"ts-jest": "26.4.1",
|
||||
"ts-loader": "8.0.5",
|
||||
"ts-node": "9.0.0",
|
||||
"typescript": "4.0.3",
|
||||
"prettier": "2.2.1",
|
||||
"ts-jest": "26.5.4",
|
||||
"ts-loader": "8.1.0",
|
||||
"ts-node": "9.1.1",
|
||||
"typescript": "4.2.3",
|
||||
"url-loader": "4.1.1",
|
||||
"webpack": "4.44.1",
|
||||
"webpack-cli": "3.3.12",
|
||||
"webpack-dev-server": "3.11.0",
|
||||
"whatwg-fetch": "3.4.1"
|
||||
"webpack": "5.30.0",
|
||||
"webpack-cli": "4.6.0",
|
||||
"whatwg-fetch": "3.6.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"lodash": ">=4.17.20",
|
||||
|
|
@ -155,7 +152,8 @@
|
|||
"autolinker": ">=3.14.1",
|
||||
"bl": ">=2.2.1",
|
||||
"decompress": ">=4.2.1",
|
||||
"node-forge": ">=0.10.0"
|
||||
"node-forge": ">=0.10.0",
|
||||
"@types/webpack": ">=5.28.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import CopyWebpackPlugin from 'copy-webpack-plugin';
|
|||
|
||||
const pages = ['index', 'demo'];
|
||||
|
||||
function plugins(page: string): webpack.Plugin[] {
|
||||
function plugins(page: string): webpack.WebpackPluginInstance[] {
|
||||
return [
|
||||
new MiniCssExtractPlugin({
|
||||
filename: '[name].css',
|
||||
|
|
@ -47,11 +47,6 @@ function plugins(page: string): webpack.Plugin[] {
|
|||
|
||||
const config: webpack.Configuration[] = pages.map(page => {
|
||||
return {
|
||||
devServer: {
|
||||
port: 3000,
|
||||
open: true,
|
||||
contentBase: path.join(__dirname, './website'),
|
||||
},
|
||||
entry: {
|
||||
[page]: `./website/templates/pages/${page}/${page}.ts`,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue