mazey 3.12.0 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mazey",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "description": "A functional library for daily front-end work.",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.esm.js",
@@ -10,19 +10,17 @@
10
10
  "directories": {
11
11
  "lib": "./lib"
12
12
  },
13
- "unpkg": "lib/mazey.min.js",
14
- "jsdelivr": "lib/mazey.min.js",
15
13
  "scripts": {
16
14
  "dev": "webpack serve --config ./scripts/webpack.config.dev.js --open",
17
- "build": "cross-env SCRIPTS_NPM_PACKAGE_DEBUG=close SCRIPTS_NPM_PACKAGE_VERSION=$npm_package_version rollup --config ./scripts/rollup.config.mjs",
18
- "build:debug": "cross-env SCRIPTS_NPM_PACKAGE_DEBUG=open SCRIPTS_NPM_PACKAGE_VERSION=$npm_package_version rollup --config ./scripts/rollup.config.mjs",
15
+ "build": "cross-env SCRIPTS_NPM_PACKAGE_DEBUG=close rollup --config ./scripts/rollup.config.js",
16
+ "build:debug": "cross-env SCRIPTS_NPM_PACKAGE_DEBUG=open rollup --config ./scripts/rollup.config.js",
19
17
  "test": "jest",
20
18
  "test:debug": "npm run build:debug && npm run test",
21
19
  "lint:fix": "eslint --ext 'js,ts,tsx' --fix ./src ./test ./scripts",
22
20
  "docs": "typedoc --readme ./README.md --excludeProtected --excludePrivate --excludeInternal --hideGenerator",
23
21
  "preview": "npm run build && npm run test",
24
22
  "release": "npm run preview && cross-env SCRIPTS_NPM_PACKAGE_VERSION=$npm_package_version node ./scripts/release.js",
25
- "release:win": "bash scripts/env.sh && npm i && npm run release"
23
+ "release:win": "bash scripts/env.sh && npm i --registry=https://registry.npmmirror.com && npm run release"
26
24
  },
27
25
  "repository": {
28
26
  "type": "git",
@@ -65,53 +63,52 @@
65
63
  },
66
64
  "homepage": "https://github.com/mazeyqian/mazey#readme",
67
65
  "devDependencies": {
68
- "@babel/core": "^7.23.2",
69
- "@babel/plugin-transform-class-properties": "^7.22.5",
70
- "@babel/plugin-transform-object-rest-spread": "^7.22.15",
71
- "@babel/plugin-transform-runtime": "^7.23.2",
72
- "@babel/preset-env": "^7.23.2",
73
- "@babel/preset-typescript": "^7.23.2",
74
- "@babel/runtime": "^7.23.2",
75
- "@babel/runtime-corejs3": "^7.23.2",
76
- "@commitlint/cli": "^17.8.1",
77
- "@commitlint/config-conventional": "^17.8.1",
78
- "@rollup/plugin-babel": "^6.0.3",
79
- "@rollup/plugin-commonjs": "^25.0.7",
80
- "@rollup/plugin-terser": "^0.4.4",
81
- "@types/jquery": "^3.5.29",
82
- "@typescript-eslint/eslint-plugin": "^6.12.0",
83
- "@typescript-eslint/parser": "^6.12.0",
84
- "clean-webpack-plugin": "^4.0.0",
85
- "core-js": "^3.33.2",
66
+ "@babel/core": "^7.8.4",
67
+ "@babel/plugin-proposal-class-properties": "^7.10.4",
68
+ "@babel/plugin-proposal-object-rest-spread": "^7.11.0",
69
+ "@babel/plugin-transform-runtime": "^7.11.0",
70
+ "@babel/preset-env": "^7.5.5",
71
+ "@babel/preset-typescript": "^7.10.4",
72
+ "@babel/runtime": "^7.20.7",
73
+ "@babel/runtime-corejs3": "^7.11.2",
74
+ "@commitlint/cli": "^8.3.5",
75
+ "@commitlint/config-conventional": "^8.3.4",
76
+ "@types/jquery": "^3.5.18",
77
+ "@typescript-eslint/eslint-plugin": "^4.22.0",
78
+ "@typescript-eslint/parser": "^4.22.0",
79
+ "clean-webpack-plugin": "^1.0.1",
80
+ "core-js": "^3.6.5",
86
81
  "cross-env": "^7.0.3",
87
- "date-fns": "^2.30.0",
88
- "eslint": "^8.54.0",
89
- "eslint-config-standard": "^17.1.0",
90
- "eslint-plugin-import": "^2.29.0",
91
- "eslint-plugin-node": "^11.1.0",
92
- "eslint-plugin-promise": "^6.1.1",
93
- "eslint-plugin-standard": "^4.1.0",
94
- "execa": "^7.2.0",
95
- "html-webpack-plugin": "^5.5.3",
96
- "husky": "^8.0.3",
97
- "jest": "^29.7.0",
98
- "jest-environment-jsdom": "^29.7.0",
99
- "lint-staged": "^14.0.1",
82
+ "date-fns": "^2.29.3",
83
+ "eslint": "^6.8.0",
84
+ "eslint-config-standard": "^14.1.0",
85
+ "eslint-plugin-import": "^2.20.1",
86
+ "eslint-plugin-node": "^11.0.0",
87
+ "eslint-plugin-promise": "^4.2.1",
88
+ "eslint-plugin-standard": "^4.0.1",
89
+ "execa": "^4.1.0",
90
+ "html-webpack-plugin": "^3.2.0",
91
+ "husky": "^4.3.8",
92
+ "jest": "^27.5.1",
93
+ "lint-staged": "^10.0.8",
100
94
  "markdown-toc": "^1.2.0",
101
- "prettier": "^2.8.8",
102
- "prettier-eslint-cli": "^8.0.1",
103
- "rollup": "^3.29.4",
95
+ "prettier": "^1.19.1",
96
+ "prettier-eslint-cli": "^5.0.0",
97
+ "rollup": "^2.79.1",
98
+ "rollup-plugin-babel": "^4.3.3",
104
99
  "rollup-plugin-cleaner": "^1.0.0",
100
+ "rollup-plugin-commonjs": "^10.1.0",
105
101
  "rollup-plugin-copy": "^3.4.0",
106
- "rollup-plugin-dts": "^6.1.0",
107
- "rollup-plugin-typescript2": "^0.34.1",
108
- "ts-loader": "^9.4.4",
102
+ "rollup-plugin-dts": "^4.2.3",
103
+ "rollup-plugin-terser": "^7.0.2",
104
+ "rollup-plugin-typescript2": "^0.30.0",
105
+ "ts-loader": "^8.0.2",
109
106
  "tslib": "^2.6.2",
110
- "typedoc": "^0.25.4",
111
- "typescript": "5.3.2",
112
- "webpack": "^5.89.0",
113
- "webpack-cli": "^5.1.4",
114
- "webpack-dev-server": "^4.15.1"
107
+ "typedoc": "^0.24.8",
108
+ "typescript": "5.1.6",
109
+ "webpack": "^4.46.0",
110
+ "webpack-cli": "^4.10.0",
111
+ "webpack-dev-server": "^3.11.3"
115
112
  },
116
113
  "husky": {
117
114
  "hooks": {
@@ -1,152 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
- /* eslint-disable no-undef */
3
- // import json from '@rollup/plugin-json'
4
- import { babel } from '@rollup/plugin-babel';
5
- import commonjs from '@rollup/plugin-commonjs';
6
- import rollupTypescript from 'rollup-plugin-typescript2';
7
- import { DEFAULT_EXTENSIONS } from '@babel/core';
8
- import cleaner from 'rollup-plugin-cleaner';
9
- import terser from '@rollup/plugin-terser';
10
- import { dts } from 'rollup-plugin-dts';
11
- // import { version as pkgJSONVersion } from '../package.json';
12
- // import replace from '@rollup/plugin-replace';
13
- // import copy from 'rollup-plugin-copy';
14
-
15
- // const path = require('path');
16
- // const _resolve = (_path) => path.resolve(__dirname, _path);
17
-
18
- import path from 'path';
19
- import { fileURLToPath } from 'url';
20
- import { dirname } from 'path';
21
-
22
- const __filename = fileURLToPath(import.meta.url);
23
- const __dirname = dirname(__filename);
24
-
25
- const _resolve = (_path) => path.resolve(__dirname, _path);
26
-
27
- // const { _resolve } = require('./build-helper');
28
- const pkgVersion = process.env.SCRIPTS_NPM_PACKAGE_VERSION || process.env.VERSION || 'unknown'; // || require('../package.json').version;
29
- const debugMode = process.env.SCRIPTS_NPM_PACKAGE_DEBUG;
30
- const banner =
31
- '/*!\n' +
32
- ` * Mazey v${pkgVersion} https://github.com/mazeyqian/mazey\n` +
33
- ` * (c) 2018-${new Date().getFullYear()} Cheng\n` +
34
- ' * Released under the MIT License.\n' +
35
- ' */';
36
-
37
- const plugins = [
38
- // replace({
39
- // __MAZEY_NPM_PACKAGE_VERSION__: pkgVersion,
40
- // }),
41
- // Remove the `lib` directory before rebuilding.
42
- // https://github.com/aMarCruz/rollup-plugin-cleanup
43
- // cleaner({
44
- // targets: [
45
- // _resolve('../lib/'),
46
- // ],
47
- // }),
48
- rollupTypescript(),
49
- commonjs({
50
- include: /node_modules/,
51
- }),
52
- babel({
53
- babelHelpers: 'runtime',
54
- // 只转换源代码,不运行外部依赖
55
- exclude: '**/node_modules/**',
56
- // babel 默认不支持 ts 需要手动添加
57
- extensions: [
58
- ...DEFAULT_EXTENSIONS,
59
- '.ts',
60
- ],
61
- // skipPreflightCheck: true,
62
- }),
63
- // dts(),
64
- // uglify(),
65
- // https://www.npmjs.com/package/rollup-plugin-copy
66
- // copy({
67
- // targets: [
68
- // {
69
- // src: _resolve('../src/t.html'),
70
- // dest: _resolve('../docs'),
71
- // },
72
- // ],
73
- // }),
74
- ];
75
-
76
- const iifePlugins = [];
77
-
78
- // console.log('debugMode:', debugMode);
79
- if (debugMode !== 'open') {
80
- iifePlugins.push(
81
- // Add minification.
82
- // https://github.com/TrySound/rollup-plugin-terser
83
- terser({ // https://github.com/terser/terser
84
- format: {
85
- // https://github.com/terser/terser#format-options
86
- comments: /^!\n\s\*\smazey/, // 'some', // `false` to omit comments in the output
87
- },
88
- }),
89
- );
90
- }
91
-
92
- const dTsConf = {
93
- input: _resolve('../src/typing.d.ts'),
94
- // https://rollupjs.org/guide/en/#outputformat
95
- output: [
96
- {
97
- file: _resolve('../lib/typing.d.ts'),
98
- format: 'es',
99
- },
100
- ],
101
- plugins: [
102
- // ...plugins,
103
- // cleaner({
104
- // targets: [
105
- // _resolve('../lib/index.d.ts'),
106
- // ],
107
- // }),
108
- dts(),
109
- ],
110
- external: [],
111
- };
112
-
113
- // console.log('dTsConf:', dTsConf);
114
-
115
- // https://rollupjs.org/guide/en/
116
- export default [
117
- {
118
- input: _resolve('../src/index.ts'),
119
- // https://rollupjs.org/guide/en/#outputformat
120
- output: [
121
- {
122
- file: _resolve('../lib/index.cjs.js'),
123
- format: 'cjs',
124
- banner,
125
- plugins: iifePlugins,
126
- },
127
- {
128
- file: _resolve('../lib/index.esm.js'),
129
- format: 'esm',
130
- banner,
131
- plugins: iifePlugins,
132
- },
133
- {
134
- file: _resolve('../lib/mazey.min.js'),
135
- format: 'iife',
136
- name: 'mazey',
137
- banner,
138
- plugins: iifePlugins,
139
- },
140
- ],
141
- plugins: [
142
- ...plugins,
143
- cleaner({
144
- targets: [
145
- _resolve('../lib/'),
146
- ],
147
- }),
148
- ],
149
- external: [],
150
- },
151
- dTsConf,
152
- ];