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 rollup plugins and fix security vulnerability in kind-of #230

Merged
merged 1 commit into from
Jun 17, 2020
Merged
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
147 changes: 76 additions & 71 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,78 @@
{
"name": "ancesdir",
"version": "2.0.0",
"description": "Find a specific ancestor/root directory given a starting location and a search parameter",
"main": "dist/index.js",
"repository": "https://github.com/somewhatabstract/ancesdir.git",
"bugs": {
"url": "https://github.com/somewhatabstract/ancesdir/issues"
},
"author": "Jeff Yates <[email protected]>",
"license": "MIT",
"private": false,
"engines": {
"node": ">= 10"
},
"keywords": [
"find",
"ancestor",
"utility",
"root",
"directory",
"folder",
"project",
"repository"
],
"files": [
"dist"
],
"devDependencies": {
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.6.0",
"@babel/preset-flow": "^7.0.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^26.0.0",
"codecov": "^3.5.0",
"eslint": "^7.0.0",
"eslint-plugin-flowtype": "^5.1.0",
"flow-bin": "^0.127.0",
"flow-typed": "^3.1.0",
"jest": "^26.0.0",
"jest-extended": "^0.11.2",
"pre-commit": "^1.2.2",
"prettier": "^2.0.1",
"pretty-quick": "^2.0.0",
"rollup": "^2.0.6",
"rollup-plugin-analyzer": "^3.1.2",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-babel-minify": "^10.0.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-visualizer": "^4.0.1"
},
"scripts": {
"prepublishOnly": "yarn clean && yarn build",
"clean": "rm -rf dist",
"build": "yarn test && rollup -c",
"test": "jest --colors --config jest.config.js",
"coverage": "jest --colors --config jest.config.js --coverage",
"pretty-quick": "pretty-quick --staged",
"flow:ci": "flow check",
"flow:dev": "flow",
"lint": "eslint --report-unused-disable-directives --config .eslintrc.json \"{src,bin,__{tests,mocks}__}/**/*.js\""
},
"pre-commit": [
"pretty-quick",
"flow:dev",
"lint",
"test"
],
"dependencies": {}
"name": "ancesdir",
"version": "2.0.0",
"description": "Find a specific ancestor/root directory given a starting location and a search parameter",
"main": "dist/index.js",
"repository": "https://github.com/somewhatabstract/ancesdir.git",
"bugs": {
"url": "https://github.com/somewhatabstract/ancesdir/issues"
},
"author": "Jeff Yates <[email protected]>",
"license": "MIT",
"private": false,
"engines": {
"node": ">= 10"
},
"keywords": [
"find",
"ancestor",
"utility",
"root",
"directory",
"folder",
"project",
"repository"
],
"files": [
"dist"
],
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.6.0",
"@babel/preset-flow": "^7.0.0",
"@rollup/plugin-babel": "^5.0.3",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-node-resolve": "^8.0.1",
"babel-eslint": "^10.0.3",
"babel-jest": "^26.0.0",
"codecov": "^3.5.0",
"eslint": "^7.0.0",
"eslint-plugin-flowtype": "^5.1.0",
"flow-bin": "^0.127.0",
"flow-typed": "^3.1.0",
"jest": "^26.0.0",
"jest-extended": "^0.11.2",
"pre-commit": "^1.2.2",
"prettier": "^2.0.1",
"pretty-quick": "^2.0.0",
"rollup": "^2.0.6",
"rollup-plugin-analyzer": "^3.1.2",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-visualizer": "^4.0.1"
},
"resolutions": {
"nanomatch/kind-of": "^6.0.3",
"micromatch/kind-of": "^6.0.3",
"is-descriptor/kind-of": "^6.0.3"
},
"scripts": {
"prepublishOnly": "yarn clean && yarn build",
"clean": "rm -rf dist",
"build": "yarn test && rollup -c",
"test": "jest --colors --config jest.config.js",
"coverage": "jest --colors --config jest.config.js --coverage",
"pretty-quick": "pretty-quick --staged",
"flow:ci": "flow check",
"flow:dev": "flow",
"lint": "eslint --report-unused-disable-directives --config .eslintrc.json \"{src,bin,__{tests,mocks}__}/**/*.js\""
},
"pre-commit": [
"pretty-quick",
"flow:dev",
"lint",
"test"
]
}
16 changes: 8 additions & 8 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import resolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import minify from "rollup-plugin-babel-minify";
import resolve from "@rollup/plugin-node-resolve";
import babel from "@rollup/plugin-babel";
import commonjs from "@rollup/plugin-commonjs";
import {terser} from "rollup-plugin-terser";
import analyzer from "rollup-plugin-analyzer";
import visualizer from "rollup-plugin-visualizer";

Expand All @@ -15,11 +15,10 @@ const getOptionalPlugins = () => {
// NOTE: The analysis is of the pre-minified output.
// So the reported bundle size is the non-minified size that includes
// comments and full code.
analyzer({summaryOnly: true, filter: module => module.size !== 0}),
analyzer({summaryOnly: true, filter: (module) => module.size !== 0}),
visualizer({
title: "ancesdir bundle rollup (minified)",
filename: "obj/stats.html",
open: true,
}),
];
};
Expand All @@ -35,9 +34,10 @@ export default {
resolve({preferBuiltins: true}),
babel({
exclude: "node_modules/**", // only transpile our source code
babelHelpers: "bundled",
}),
commonjs({namedExports: {"promise.prototype.finally": ["shim"]}}),
minify({comments: false}),
commonjs(),
terser(),
...getOptionalPlugins(),
],
};
Loading