Skip to content

Commit 1a213be

Browse files
authored
version 0.17.0 (#199)
* use webpack hook * version 0.17.0
1 parent 478faec commit 1a213be

File tree

17 files changed

+36
-24
lines changed

17 files changed

+36
-24
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The fastest open-source data table for web.
2323
[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)
2424

2525
```html
26-
<script src="https://unpkg.com/cheetah-grid@0.16"></script>
26+
<script src="https://unpkg.com/cheetah-grid@0.17"></script>
2727
```
2828

2929
### Downloading Cheetah Grid using npm
@@ -46,10 +46,10 @@ const cheetahGrid = require("cheetah-grid")
4646

4747
[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)
4848

49-
[cheetahGrid.es5.min.js](https://unpkg.com/cheetah-grid@0.16/dist/cheetahGrid.es5.min.js)
49+
[cheetahGrid.es5.min.js](https://unpkg.com/cheetah-grid@0.17/dist/cheetahGrid.es5.min.js)
5050

5151
SourceMap
52-
[cheetahGrid.es5.min.js.map](https://unpkg.com/cheetah-grid@0.16/dist/cheetahGrid.es5.min.js.map)
52+
[cheetahGrid.es5.min.js.map](https://unpkg.com/cheetah-grid@0.17/dist/cheetahGrid.es5.min.js.map)
5353

5454

5555
### Downloading Cheetah Grid using GitHub

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cheetah-grid-manager",
33
"private": true,
4-
"version": "0.16.0",
4+
"version": "0.17.0",
55
"description": "Cheetah Grid is a high performance grid engine that works on canvas",
66
"keywords": [
77
"spreadsheet",

packages/cheetah-grid-icon-svg-loader/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cheetah-grid-icon-svg-loader/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cheetah-grid-icon-svg-loader",
3-
"version": "0.16.0",
3+
"version": "0.17.0",
44
"description": "Webpack loader that loads the icon module for Cheetah Grid from SVG.",
55
"main": "lib/index.js",
66
"files": [

packages/cheetah-grid/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cheetah-grid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cheetah-grid",
3-
"version": "0.16.0",
3+
"version": "0.17.0",
44
"description": "Cheetah Grid is a high performance grid engine that works on canvas",
55
"keywords": [
66
"spreadsheet",

packages/cheetah-grid/webpack/fork/babel-webpack-plugin/index.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,36 @@ const OriginalSource = require("webpack-sources").OriginalSource;
44
const ModuleFilenameHelpers = require("webpack/lib/ModuleFilenameHelpers");
55
const RequestShortener = require("webpack/lib/RequestShortener");
66
const babel = require("@babel/core");
7+
const webpack = require('webpack');
8+
9+
/**
10+
* @typedef {import("webpack").Compiler} Compiler
11+
*/
712

813
class BabelPlugin {
914
constructor(options) {
1015
if(typeof options !== "object" || Array.isArray(options)) options = {};
1116
this.options = options;
1217
}
1318

19+
/**
20+
* @param {Compiler} compiler webpack.Compiler
21+
*/
1422
apply(compiler) {
1523
const options = this.options;
1624
options.test = options.test || /\.js($|\?)/i;
1725
options.presets = options.presets || ["es2015"];
1826
options.compact = options.compact || false;
1927

2028
const requestShortener = new RequestShortener(compiler.context);
21-
compiler.plugin("compilation", (compilation) => {
29+
compiler.hooks.compilation.tap("BabelPlugin", (compilation) => {
2230
if(options.sourceMaps) {
23-
compilation.plugin("build-module", (module) => {
31+
compilation.hooks.buildModule.tap("BabelPlugin", (module) => {
2432
// to get detailed location info about errors
2533
module.useSourceMap = true;
2634
});
2735
}
28-
compilation.plugin("optimize-chunk-assets", (chunks, callback) => {
36+
compilation.hooks.optimizeChunkAssets.tapAsync("BabelPlugin", (chunks, callback) => {
2937
let files = [];
3038
chunks.forEach((chunk) => files.push(...chunk.files));
3139
files.push(...compilation.additionalChunkAssets);

packages/demo/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cheetah-grid-demo",
33
"private": true,
4-
"version": "0.16.0",
4+
"version": "0.17.0",
55
"description": "",
66
"main": "index.js",
77
"scripts": {

packages/docs/introduction/getting-started-with-vue.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ order: 20
1111
[![npm](https://img.shields.io/npm/v/vue-cheetah-grid.svg)](https://www.npmjs.com/package/vue-cheetah-grid)
1212

1313
```html
14-
<script src="https://unpkg.com/cheetah-grid@0.16"></script>
15-
<script src="https://unpkg.com/vue-cheetah-grid@0.16"></script>
14+
<script src="https://unpkg.com/cheetah-grid@0.17"></script>
15+
<script src="https://unpkg.com/vue-cheetah-grid@0.17"></script>
1616
```
1717

1818
```js

packages/docs/introduction/getting-started.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ order: 10
1111
[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)
1212

1313
```html
14-
<script src="https://unpkg.com/cheetah-grid@0.16"></script>
14+
<script src="https://unpkg.com/cheetah-grid@0.17"></script>
1515
```
1616

1717
### Via npm
@@ -30,11 +30,11 @@ const cheetahGrid = require("cheetah-grid")
3030

3131
[![npm](https://img.shields.io/npm/v/cheetah-grid.svg)](https://www.npmjs.com/package/cheetah-grid)
3232

33-
[cheetahGrid.es5.min.js](https://unpkg.com/cheetah-grid@0.16/dist/cheetahGrid.es5.min.js)
33+
[cheetahGrid.es5.min.js](https://unpkg.com/cheetah-grid@0.17/dist/cheetahGrid.es5.min.js)
3434

3535
#### SourceMap
3636

37-
[cheetahGrid.es5.min.js.map](https://unpkg.com/cheetah-grid@0.16/dist/cheetahGrid.es5.min.js.map)
37+
[cheetahGrid.es5.min.js.map](https://unpkg.com/cheetah-grid@0.17/dist/cheetahGrid.es5.min.js.map)
3838

3939
### Via GitHub
4040

packages/docs/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cheetah-grid-docs",
33
"private": true,
4-
"version": "0.16.0",
4+
"version": "0.17.0",
55
"scripts": {
66
"watch": "vuepress dev . --debug",
77
"build": "npm-run-all build:*",

packages/vue-cheetah-grid/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vue-cheetah-grid/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-cheetah-grid",
3-
"version": "0.16.0",
3+
"version": "0.17.0",
44
"description": "Cheetah Grid for Vue.js",
55
"main": "dist/vueCheetahGrid.js",
66
"files": [

scripts/check_versions.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ function checkPackageJson(pkg, pkgs) {
4343
if (minorVersion(pkg.version) !== minorVersion(version)) {
4444
const message = `Invalid version. ${pkg.name}@${pkg.version} root:${version} @ "${pkg.rootDir}/package.json"`;
4545
console.error(message);
46-
errors.push(Promise.reject(new Error(message)));
46+
47+
errors.push(
48+
callNpm(pkg, 'version', [version], opts).
49+
then(() => Promise.reject(new Error(message)))
50+
);
4751
}
4852

4953
// check dependencies

0 commit comments

Comments
 (0)