Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clojure compiler warning #444

Closed
vagran opened this issue Jan 16, 2018 · 4 comments · Fixed by #454
Closed

Clojure compiler warning #444

vagran opened this issue Jan 16, 2018 · 4 comments · Fixed by #454

Comments

@vagran
Copy link

vagran commented Jan 16, 2018

When compiling JS which uses page.js it has the following annoying warning:

node_modules/page/page.js:1: WARNING - Suspicious code. The result of the 'not' operator is not being used.
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.page=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

Would be cool to replace "!function(...){..}(...)" by "(function(...){...})(...)".

@matthewp matthewp added the bug label Jan 16, 2018
@matthewp
Copy link
Collaborator

Thanks! I wonder if switching to something like rollup instead of browserify would fix this.

@paulocoghi
Copy link
Contributor

Yep. Using Rollup fix this. I use it.

@matthewp
Copy link
Collaborator

I just wonder if this is considered a "breaking change" or not. Can't think of a reason why it would be...

@paulocoghi
Copy link
Contributor

For me, I only consider that it's a "breaking change" when it implies changes in end use.

If the way developers use the library does not change, changing the way the maintainers develop it is not considered a "breaking change", IMHO.

matthewp added a commit that referenced this issue Jan 21, 2018
This switches to using rollup for the build. This fixes #444 among other
things.
matthewp added a commit that referenced this issue Jan 23, 2018
This switches to using rollup for the build. This fixes #444 among other
things.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants