Chris2011 / minifierbeans

Plugin to minify JS , CSS and HTML for quicken page load times by reducing the size of js/css/html files.
http://plugins.netbeans.org/plugin/49666/js-css-minify-compress
Apache License 2.0
37 stars 9 forks source link

Installation in Netbeans 12.3 on OpenJDK 11 with Minifierbeans-3.3.0 not working. #72

Closed JuergenLaas closed 3 years ago

JuergenLaas commented 3 years ago

Hello,

i had downloaded OpenJDK 11 from https://adoptopenjdk.net/ and install it on Windows 10 machine. Netbeans 12.3 with Minifierbeans-2.5.1 work fine. But after upgrade on Minifierbeans-3.3.0, Minifierbeans-3.2.0, Minifierbeans-3.1.0 or Minifierbeans-3.0.0 i get an error

netbeans error cannot decrease processed work unit count(-2011422090) to lower value than before (0)

What happened?

Chris2011 commented 3 years ago

Is this just that massage? No stacktrace? When I google for this error, I see that this is an Illegal...Exception. So please if you have more informationm error messages, copy and paste it here. Thx.

JuergenLaas commented 3 years ago

I don't know what happened. But now I can install it without problems. Unfortunately I still have problems when I restart my checkbox in settings "Minify on Save" is removed again and code appears in JavaScript which does not come from me.

Here is it

var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){if(b==Array.prototype||b==Object.prototype)return b;b[c]=d.value;return b}; $jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<b.length;++c){var d=b[c];if(d&&d.Math==Math)return d}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={}; $jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,c){var d=$jscomp.propertyToPolyfillSymbol[c];if(null==d)return b[c];d=b[d];return void 0!==d?d:b[c]};$jscomp.polyfill=function(b,c,d,f){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,c,d,f):$jscomp.polyfillUnisolated(b,c,d,f))}; $jscomp.polyfillUnisolated=function(b,c,d,f){d=$jscomp.global;b=b.split(".");for(f=0;f<b.length-1;f++){var e=b[f];if(!(e in d))return;d=d[e]}b=b[b.length-1];f=d[b];c=c(f);c!=f&&null!=c&&$jscomp.defineProperty(d,b,{configurable:!0,writable:!0,value:c})}; $jscomp.polyfillIsolated=function(b,c,d,f){var e=b.split(".");b=1===e.length;f=e[0];f=!b&&f in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var g=0;g<e.length-1;g++){var k=e[g];if(!(k in f))return;f=f[k]}e=e[e.length-1];d=$jscomp.IS_SYMBOL_NATIVE&&"es6"===d?f[e]:null;c=c(d);null!=c&&(b?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:c}):c!==d&&($jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+e,e= $jscomp.propertyToPolyfillSymbol[e],$jscomp.defineProperty(f,e,{configurable:!0,writable:!0,value:c})))};$jscomp.polyfill("Object.is",function(b){return b?b:function(c,d){return c===d?0!==c||1/c===1/d:c!==c&&d!==d}},"es6","es3");$jscomp.polyfill("Array.prototype.includes",function(b){return b?b:function(c,d){var f=this;f instanceof String&&(f=String(f));var e=f.length;d=d||0;for(0>d&&(d=Math.max(d+e,0));d<e;d++){var g=f[d];if(g===c||Object.is(g,c))return!0}return!1}},"es7","es3"); $jscomp.checkStringArgs=function(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""};$jscomp.polyfill("String.prototype.includes",function(b){return b?b:function(c,d){return-1!==$jscomp.checkStringArgs(this,c,"includes").indexOf(c,d||0)}},"es6","es3");

JuergenLaas commented 3 years ago

Here a screenshot the checkbox is unchecked again. github-bild

JuergenLaas commented 3 years ago

Maybe this has a reason I use VM OpenJDK 11 OpenJ9.

Chris2011 commented 3 years ago

With the checkbox is another problem, has nothing todo with the initial problem. It would be good to reproduce the initial problem if you can. With steps to reproduce. Please create another ticket for the unchecked minify of save option. This has nothing todo with this bug and is a separated one. Thx.

Chris2011 commented 3 years ago

I can see, that any options will be reset after restarting NetBeans.

Chris2011 commented 3 years ago

Done: https://github.com/Chris2011/minifierbeans/issues/73. Will check this soon.

Chris2011 commented 3 years ago

The original bug of this ticket: Problems while installing will be fixed soon. I have it in my machine, will create a bugfix soon. The thing with the code, that was inserted into your JS file will be handled here: #75 And the problem with the resetted options, will be handled here: #73

3.3.1 will just have the fix for installing/unzipping which is really problematic. The rest also but it will come later. Step by step.

Chris2011 commented 3 years ago

Ok #75 is also fixed by 3.3.1 which will be released soon.

Chris2011 commented 3 years ago

Fixed in release 3.3.1 please test it @JuergenLaas

JuergenLaas commented 3 years ago

Hello Chris,

I use Netbeans 12.4 with Openj9-0.26.0 with your new Plugin version 3.3.1 and it works!

But i have noticed if i compress CSS-File with your Plugin.

Terminal of Netbeans 12.4 output follow message:

Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db

Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

Chris2011 commented 3 years ago

Yeah, I already noticed it, thx for the info. It is just an info/warning. I will have a look later.

JuergenLaas commented 3 years ago

I would like to inform you that your plugin is not available on Netbeans at the following address https://plugins.netbeans.apache.org/?search=minifierbeans&nbv=&cat=

Nothing is found

Someone has kicked it out because of problems.

You will probably need to contact Netbeans team or re-upload your plugin.

Chris2011 commented 3 years ago

Thx, but it was never uploaded to the new plugin portal 3. The process of getting it into the new plugin portal is way to complex and I didn't find time to get through all the processes. I find it to comples that's why you just can find it here under the releases section.

Chris2011 commented 3 years ago

I will remove the link from the readme.