diff --git a/.circleci/config.yml b/.circleci/config.yml index d4e2517..bd21929 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,14 +9,12 @@ jobs: - restore_cache: key: deps3-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }} - run: - name: install-npm-wee command: npm install - save_cache: key: deps3-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum "package-lock.json" }} paths: - ./node_modules - run: - name: dist command: npm run dist - store_artifacts: path: dist diff --git a/package.json b/package.json index 8db14bc..16be141 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "src/**/*.scss" ], "scripts": { - "clean": "rimraf build dist && npm run clean:compile", + "clean": "rimraf build dist *.tgz && npm run clean:compile", "clean:compile": "rimraf node_modules/.cache/cache-loader *.tsbuildinfo src/**/*.map src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.map tests/**/*.d.ts demo/*.js demo/*.map demo/*.d.ts", "compile": "tsc", "compile:dev": "tsc -p ./tsconfig.dev.json", @@ -58,8 +58,8 @@ "watch": "webpack --mode development --watch --devtool source-map", "start": "webpack-dev-server --mode development --devtool source-map", "predist": "npm run build", - "dist": "mkdirp dist && cross-zip ./build ./dist/lineupengine.zip", - "postdist": "npm run docs && cross-zip ./build/docs ../dist/lineupengine_docs.zip", + "dist": "mkdirp dist && jszip -o ./dist/lineupengine.zip ./build", + "postdist": "npm run docs && jszip -o ../dist/lineupengine_docs.zip ./build/docs", "prepare": "echo 'dummy prepare since prepack has no dev dependencies'", "prepack": "npm run clean && npm run compile && npm run build:prod", "release:major": "release-it major", @@ -71,12 +71,12 @@ "@types/jest": "^24.0.14", "cache-loader": "^4.0.0", "css-loader": "^3.0.0", - "cross-zip-cli": "^1.0.0", "extract-loader": "^3.1.0", "file-loader": "^4.0.0", "fork-ts-checker-webpack-plugin": "^1.3.7", "jest": "^24.8.0", "json-loader": "^0.5.7", + "jszip-cli": "^1.4.24", "mini-css-extract-plugin": "^0.7.0", "mkdirp": "^0.5.1", "node-sass": "^4.12.0", diff --git a/src/ARowRenderer.ts b/src/ARowRenderer.ts index 817af95..bc35fb3 100644 --- a/src/ARowRenderer.ts +++ b/src/ARowRenderer.ts @@ -296,6 +296,15 @@ export abstract class ARowRenderer { //fully loaded this.body.replaceChild(real, proxy); } + this.loading.delete(proxy); + ARowRenderer.cleanUp(proxy); + this.loadingPool.push(proxy); + }, () => { + // handle as aborted + //aborted can recycle the real one + ARowRenderer.cleanUp(real); + this.pool.push(real); + this.loading.delete(proxy); ARowRenderer.cleanUp(proxy); this.loadingPool.push(proxy); diff --git a/tslint.json b/tslint.json index 4bfdf17..5d933d4 100644 --- a/tslint.json +++ b/tslint.json @@ -33,12 +33,7 @@ "jsdoc-format": true, "label-position": true, "max-line-length": false, - "member-ordering": [ - false, - "public-before-private", - "static-before-instance", - "variables-before-functions" - ], + "member-ordering": false, "new-parens": true, "no-arg": true, "no-bitwise": true, @@ -62,7 +57,6 @@ "no-switch-case-fall-through": true, "no-trailing-whitespace": true, "no-unused-expression": true, - "no-use-before-declare": true, "no-unsafe-finally": true, "no-var-requires": true, "no-var-keyword": true, diff --git a/webpack.config.js b/webpack.config.js index 67f185b..8bf66d8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,7 +7,6 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); const now = new Date(); const prefix = (n) => n < 10 ? ('0' + n) : n.toString(); const buildId = `${now.getUTCFullYear()}${prefix(now.getUTCMonth() + 1)}${prefix(now.getUTCDate())}-${prefix(now.getUTCHours())}${prefix(now.getUTCMinutes())}${prefix(now.getUTCSeconds())}`; -pkg.version = pkg.version.replace('SNAPSHOT', buildId); const year = (new Date()).getFullYear(); const banner = `/*! ${pkg.title || pkg.name} - v${pkg.version} - ${year}\n` + @@ -28,7 +27,7 @@ module.exports = (_env, options) => { demo: './demo/index.ts', table: './demo/table.ts', cell: './demo/cell.ts' - }, + }, output: { path: resolve(__dirname, 'build'), filename: `[name].js`, @@ -39,7 +38,7 @@ module.exports = (_env, options) => { umdNamedDefine: false //anonymous require module }, resolve: { - extensions: ['.ts', '.tsx', '.js'], + extensions: ['.ts', '.tsx', '.mjs', '.js'], symlinks: false }, plugins: [