From 49bc8fa8c0952bab9c172d91718752f828ababcd Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Fri, 16 Jul 2021 13:24:37 +0545 Subject: [PATCH 1/3] fix: npm installation error --- build-browser.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-browser.js b/build-browser.js index 6101d652a..1efbd8488 100644 --- a/build-browser.js +++ b/build-browser.js @@ -6,7 +6,7 @@ import babelPresetEnv from '@babel/preset-env'; import pkg from './package.json'; rollup({ - entry: 'src/index.js', + input: 'src/index.js', plugins: [ babel({ presets: [[babelPresetEnv, { modules: false }]], @@ -15,9 +15,9 @@ rollup({ ], }).then(bundle => ( bundle.write({ - dest: 'validator.js', + file: 'validator.js', format: 'umd', - moduleName: pkg.name, + name: pkg.name, banner: ( `/*!\n${ String(fs.readFileSync('./LICENSE')) diff --git a/package.json b/package.json index 72573e375..941fdc841 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "mocha": "^6.2.3", "nyc": "^14.1.0", "rimraf": "^3.0.0", - "rollup": "^0.43.0", + "rollup": "^2.53.2", "rollup-plugin-babel": "^4.0.1", "uglify-js": "^3.0.19" }, From 01517eefd1a6e092b98121f51e55d4fa456ed414 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Fri, 16 Jul 2021 15:46:06 +0545 Subject: [PATCH 2/3] fix: chores --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 941fdc841..80b4ba762 100644 --- a/package.json +++ b/package.json @@ -36,21 +36,21 @@ "url": "git+https://github.com/validatorjs/validator.js.git" }, "devDependencies": { - "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/register": "^7.0.0", + "@babel/cli": "^7.14.5", + "@babel/core": "^7.14.6", + "@babel/preset-env": "^7.14.7", + "@babel/register": "^7.14.5", "babel-eslint": "^10.0.1", - "babel-plugin-add-module-exports": "^1.0.0", + "babel-plugin-add-module-exports": "^1.0.4", "eslint": "^4.19.1", "eslint-config-airbnb-base": "^12.1.0", - "eslint-plugin-import": "^2.11.0", + "eslint-plugin-import": "^2.23.4", "mocha": "^6.2.3", "nyc": "^14.1.0", - "rimraf": "^3.0.0", + "rimraf": "^3.0.2", "rollup": "^2.53.2", "rollup-plugin-babel": "^4.0.1", - "uglify-js": "^3.0.19" + "uglify-js": "^3.13.10" }, "scripts": { "lint": "eslint src test", From e34c3763138c10286ea63e1c517a4e7501420bac Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Fri, 16 Jul 2021 20:13:38 +0545 Subject: [PATCH 3/3] fix: fixed rollup version --- build-browser.js | 48 +++++++++++++++++++++++------------------------- package.json | 20 ++++++++++---------- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/build-browser.js b/build-browser.js index 1efbd8488..c863bd399 100644 --- a/build-browser.js +++ b/build-browser.js @@ -1,34 +1,32 @@ /* eslint import/no-extraneous-dependencies: 0 */ -import fs from 'fs'; -import { rollup } from 'rollup'; -import babel from 'rollup-plugin-babel'; -import babelPresetEnv from '@babel/preset-env'; -import pkg from './package.json'; +import fs from "fs"; +import { rollup } from "rollup"; +import babel from "rollup-plugin-babel"; +import babelPresetEnv from "@babel/preset-env"; +import pkg from "./package.json"; rollup({ - input: 'src/index.js', + entry: "src/index.js", plugins: [ babel({ presets: [[babelPresetEnv, { modules: false }]], babelrc: false, }), ], -}).then(bundle => ( - bundle.write({ - file: 'validator.js', - format: 'umd', - name: pkg.name, - banner: ( - `/*!\n${ - String(fs.readFileSync('./LICENSE')) - .trim() - .split('\n') - .map(l => ` * ${l}`) - .join('\n') - }\n */` - ), - }) -)).catch((e) => { - process.stderr.write(`${e.message}\n`); - process.exit(1); -}); +}) + .then((bundle) => + bundle.write({ + dest: "validator.js", + format: "umd", + moduleName: pkg.name, + banner: `/*!\n${String(fs.readFileSync("./LICENSE")) + .trim() + .split("\n") + .map((l) => ` * ${l}`) + .join("\n")}\n */`, + }) + ) + .catch((e) => { + process.stderr.write(`${e.message}\n`); + process.exit(1); + }); diff --git a/package.json b/package.json index 80b4ba762..239215331 100644 --- a/package.json +++ b/package.json @@ -36,21 +36,21 @@ "url": "git+https://github.com/validatorjs/validator.js.git" }, "devDependencies": { - "@babel/cli": "^7.14.5", - "@babel/core": "^7.14.6", - "@babel/preset-env": "^7.14.7", - "@babel/register": "^7.14.5", + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", "babel-eslint": "^10.0.1", - "babel-plugin-add-module-exports": "^1.0.4", + "babel-plugin-add-module-exports": "^1.0.0", "eslint": "^4.19.1", "eslint-config-airbnb-base": "^12.1.0", - "eslint-plugin-import": "^2.23.4", + "eslint-plugin-import": "^2.11.0", "mocha": "^6.2.3", "nyc": "^14.1.0", - "rimraf": "^3.0.2", - "rollup": "^2.53.2", + "rimraf": "^3.0.0", + "rollup": "^0.47.0", "rollup-plugin-babel": "^4.0.1", - "uglify-js": "^3.13.10" + "uglify-js": "^3.0.19" }, "scripts": { "lint": "eslint src test", @@ -72,4 +72,4 @@ "node": ">= 0.10" }, "license": "MIT" -} +} \ No newline at end of file