From e13a1f7940e2bcc4f2508ba3f2b59f2d8378a239 Mon Sep 17 00:00:00 2001 From: AlexHaxe Date: Tue, 3 Nov 2020 22:15:32 +0100 Subject: [PATCH] prepare 1.11.1 (#621) * prepare version 1.11.1 * fixed schema in zip file * use Haxe 4.1.4 for makeReleaseZip --- CHANGELOG.md | 2 + buildJsNode.hxml | 2 - makeReleaseZip.sh | 6 +- package-lock.json | 133 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 5 +- uglifyFormatter.sh | 12 ++++ 6 files changed, 154 insertions(+), 6 deletions(-) create mode 100755 uglifyFormatter.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d2725bb..b8322324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## dev branch / next version (1.x.x) +## version 1.11.1 (2020-11-03) + - Fixed whitespace for negative const values ([#600](https://github.com/HaxeCheckstyle/haxe-formatter/issues/600)) - Fixed multiline comments with vars, fixes [#598](https://github.com/HaxeCheckstyle/haxe-formatter/issues/598) ([#600](https://github.com/HaxeCheckstyle/haxe-formatter/issues/600)) - Fixed whitespace for null safe navigation operator, fixes [#599](https://github.com/HaxeCheckstyle/haxe-formatter/issues/599) ([#600](https://github.com/HaxeCheckstyle/haxe-formatter/issues/600)) diff --git a/buildJsNode.hxml b/buildJsNode.hxml index cbf0828f..e9321904 100644 --- a/buildJsNode.hxml +++ b/buildJsNode.hxml @@ -2,5 +2,3 @@ buildCommon.hxml -lib hxnodejs -js run.js -main formatter.Cli - --cmd mkdir -p bin && echo "#\!/usr/bin/env node" | cat - run.js > bin/formatter.js diff --git a/makeReleaseZip.sh b/makeReleaseZip.sh index 37e4f3d6..b390d522 100755 --- a/makeReleaseZip.sh +++ b/makeReleaseZip.sh @@ -4,7 +4,7 @@ npm install npx lix download -npx lix use haxe 4.0.5 +npx lix use haxe 4.1.4 npx haxe buildJsNode.hxml npx haxe buildJsBrowser.hxml @@ -12,9 +12,11 @@ npx haxe buildNeko.hxml npx haxe buildJava.hxml npx haxe buildSchema.hxml +./uglifyFormatter.sh + neko run --default-config resources/default-hxformat.json npx haxe test.hxml rm -f formatter.zip -zip -9 -r -q formatter.zip src run.n run.js resources/default-hxformat.json resources/formatter-schema.json haxelib.json README.md CHANGELOG.md LICENSE.md +zip -9 -r -q formatter.zip src run.n run.js resources/default-hxformat.json resources/hxformat-schema.json haxelib.json README.md CHANGELOG.md LICENSE.md diff --git a/package-lock.json b/package-lock.json index 1a92f89a..e9d630bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,11 +4,144 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, "lix": { "version": "15.10.1", "resolved": "https://registry.npmjs.org/lix/-/lix-15.10.1.tgz", "integrity": "sha512-UZX+p4i+2ZSEyI6p2Yu1sfC0pRRFnFHDpNQ2+FqhxmBG8cCiHZkj+I8FqCK4AUuQ/VOPE/bK69JbWez+OG3zaA==", "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "uglify-js-es6": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/uglify-js-es6/-/uglify-js-es6-2.8.9.tgz", + "integrity": "sha1-ojVFbmFOKvXUsx+8koLVxEUz3ho=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } } } } diff --git a/package.json b/package.json index cb77e69e..6c63403d 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "license": "MIT", "homepage": "https://github.com/HaxeCheckstyle/haxe-formatter#readme", "devDependencies": { - "lix": "^15.10.1" + "lix": "^15.10.1", + "uglify-js-es6": "^2.8.9" }, "bin": { "haxe-formatter": "bin/formatter.js" @@ -30,6 +31,6 @@ "registry": "https://npm.pkg.github.com/" }, "scripts": { - "build": "haxe buildAll.hxml" + "build": "haxe buildAll.hxml && ./uglifyFormatter.sh" } } diff --git a/uglifyFormatter.sh b/uglifyFormatter.sh new file mode 100755 index 00000000..41ebb034 --- /dev/null +++ b/uglifyFormatter.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +mkdir -p bin + +npx uglify-js-es6 run.js -o bin/formatter.uglify.js + +echo '#!/usr/bin/env node' > bin/formatter.js +echo "" >> bin/formatter.js +cat bin/formatter.uglify.js >> bin/formatter.js +chmod 755 bin/formatter.js + +rm bin/formatter.uglify.js