Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

View File

@ -0,0 +1,95 @@
As of version 2.0.0, the CHANGELOG is maintained on [GitHub Releases](https://github.com/terinjokes/gulp-uglify/releases).
# Change Log
<a name="1.5.4"></a>
## [1.5.4](https://github.com/terinjokes/gulp-uglify/compare/v1.5.3...v1.5.4) (2016-06-22)
## 1.5.3
- Updated UglifyJS to 2.6.2
## 1.5.2
- Updated UglfiyJS to 2.6.1
## 1.5.0
- Update UglifyJS to 2.6.0.
- CI and dependencies chores.
- Attempt to resolve issue #109 where "ghost" files would appear in generated sourcemaps.
## 1.4.2
- Updated UglifyJS to 2.5.0.
- CI and dependencies chores.
## 1.4.1
- Detect if options is a non-Object and log a warning.
Older versions of Node.js did not allow Strings to be passed to `Object.keys` leading to errors and confusion to users following certain tutorials.
## 1.4.0
- Deprecated the `preserveComments` option of "some".
- Added the `preserveComments` option of "license" that uses [`uglify-save-license`](https://github.com/shinnn/uglify-save-license).
## 1.3.0
- Updated UglifyJS to 2.4.24.
- Streams3 support via through2 dependency update.
## 1.2.0
- Update dependencies, including UglifyJS to 2.4.19.
## 1.1.0
- Fix sources path in source maps (thanks @floridoo)
- Update UglifyJS to 2.4.16 (thanks @tschaub)
## 1.0.0
- Handle cases where UglifyJS uses e.msg instead of e.message for error codes. Fixes #51.
- Supplement UglifyJSs source map merging with vinyl-sourcemap-apply to correct issues where `sources` and `sourcesContent` were different. Fixes #43.
- Refactor option parsing and defaults, and calls to uglify-js, to reduce complexity of the main function.
- Added tests for the previously forgotten `preserveComments` option.
- Updated UglifyJS to 2.4.15.
- Changed dependencies to explicit ranges to avoid `node-semver` issues.
## 0.3.2
- Removed the PluginError factory wrapper
- Removed test that was failing due to gulp-util issue.
- Tests should end the streams they are writing to.
- Update dependencies. Fixes #44. Fixes #42.
## 0.3.1
- Fixed homepage URL in npm metadata
- Removes UglifyJS-inserted sourceMappingURL comment [Fixes #39]
- Dont pass input source map to UglifyJS if there are no mappings
- Added installation instructions
## 0.3.0
- Removed support for old style source maps
- Added support for gulp-sourcemap
- Updated tape development dependency
- Dropped support for Node 0.9
- UglifyJS errors are no longer swallowed
## 0.2.1
- Correct source map output
- Remove `gulp` dependency by using `vinyl` in testing
- Passthrough null files correctly
- Report error if attempting to use a stream-backed file
## 0.2.0
- Dropped support for Node versions less than 0.9
- Switched to using Streams2
- Add support for generating source maps
- Add option for preserving comments

20
static/js/ketcher2/node_modules/gulp-uglify/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,20 @@
> Copyright (c) 2013-2014 Terin Stock <terinjokes@gmail.com>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

141
static/js/ketcher2/node_modules/gulp-uglify/README.md generated vendored Normal file
View File

@ -0,0 +1,141 @@
# gulp-uglify [![][travis-shield-img]][travis-shield][![][appveyor-shield-img]][appveyor-shield][![][npm-dl-shield-img]][npm-shield][![][npm-v-shield-img]][npm-shield][![][coveralls-shield-img]][coveralls-shield]
> Minify JavaScript with UglifyJS2.
## Installation
Install package with NPM and add it to your development dependencies:
`npm install --save-dev gulp-uglify`
## Usage
```javascript
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var pump = require('pump');
gulp.task('compress', function (cb) {
pump([
gulp.src('lib/*.js'),
uglify(),
gulp.dest('dist')
],
cb
);
});
```
To help properly handle error conditions with Node streams, this project
recommends the use of [`pump`](https://github.com/mafintosh/pump). For more
information, see [Why Use Pump?](docs/why-use-pump/README.md#why-use-pump).
## Options
- `mangle`
Pass `false` to skip mangling names.
- `output`
Pass an object if you wish to specify additional [output
options](http://lisperator.net/uglifyjs/codegen). The defaults are
optimized for best compression.
- `compress`
Pass an object to specify custom [compressor
options](http://lisperator.net/uglifyjs/compress). Pass `false` to skip
compression completely.
- `preserveComments`
A convenience option for `options.output.comments`. Defaults to preserving no
comments.
- `all`
Preserve all comments in code blocks
- `license`
Attempts to preserve comments that likely contain licensing information,
even if the comment does not have directives such as `@license` or `/*!`.
Implemented via the [`uglify-save-license`](https://github.com/shinnn/uglify-save-license)
module, this option preserves a comment if one of the following is true:
1. The comment is in the *first* line of a file
2. A regular expression matches the string of the comment.
For example: `MIT`, `@license`, or `Copyright`.
3. There is a comment at the *previous* line, and it matches 1, 2, or 3.
- `function`
Specify your own comment preservation function. You will be passed the
current node and the current comment and are expected to return either
`true` or `false`.
- `some` (deprecated)
Preserve comments that start with a bang (`!`) or include a Closure Compiler
directive (`@preserve`, `@license`, `@cc_on`).
Deprecated in favor of the `license` option, documented above.
You can also pass the `uglify` function any of the options [listed
here](https://github.com/mishoo/UglifyJS2#the-simple-way) to modify
UglifyJS's behavior.
## Errors
`gulp-uglify` emits an 'error' event if it is unable to minify a specific file.
The GulpUglifyError constructor is exported by this plugin for `instanceof` checks.
It contains the following properties:
- `fileName`: The full file path for the file being minified.
- `cause`: The original UglifyJS error, if available.
Most UglifyJS error messages have the following properties:
- `message` (or `msg`)
- `filename`
- `line`
To see useful error messages, see [Why Use Pump?](docs/why-use-pump/README.md#why-use-pump).
## Using a Different UglifyJS
By default, `gulp-uglify` uses the version of UglifyJS installed as a dependency.
It's possible to configure the use of a different version using the "minifier" entry point.
```javascript
var uglifyjs = require('uglify-js'); // can be a git checkout
// or another module (such as `uglify-js-harmony` for ES6 support)
var minifier = require('gulp-uglify/minifier');
var pump = require('pump');
gulp.task('compress', function (cb) {
// the same options as described above
var options = {
preserveComments: 'license'
};
pump([
gulp.src('lib/*.js'),
minifier(options, uglifyjs),
gulp.dest('dist')
],
cb
);
});
```
[travis-shield-img]: https://img.shields.io/travis/terinjokes/gulp-uglify/master.svg?label=Travis%20CI&style=flat-square
[travis-shield]: https://travis-ci.org/terinjokes/gulp-uglify
[appveyor-shield-img]: https://img.shields.io/appveyor/ci/terinjokes/gulp-uglify/master.svg?label=AppVeyor&style=flat-square
[appveyor-shield]: https://ci.appveyor.com/project/terinjokes/gulp-uglify
[npm-dl-shield-img]: https://img.shields.io/npm/dm/gulp-uglify.svg?style=flat-square
[npm-shield]: http://browsenpm.org/package/gulp-uglify
[npm-v-shield-img]: https://img.shields.io/npm/v/gulp-uglify.svg?style=flat-square
[coveralls-shield-img]: https://img.shields.io/coveralls/terinjokes/gulp-uglify/master.svg?style=flat-square
[coveralls-shield]: https://coveralls.io/github/terinjokes/gulp-uglify

10
static/js/ketcher2/node_modules/gulp-uglify/index.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
'use strict';
var uglify = require('uglify-js');
var minifier = require('./minifier');
var GulpUglifyError = require('./lib/gulp-uglify-error');
module.exports = function(opts) {
return minifier(opts, uglify);
};
module.exports.GulpUglifyError = GulpUglifyError;

View File

@ -0,0 +1,13 @@
'use strict';
var curry = require('lodash/fp/curry');
var GulpUglifyError = require('./gulp-uglify-error');
function createError(file, msg, cause) {
var perr = new GulpUglifyError(msg, cause);
perr.plugin = 'gulp-uglify';
perr.fileName = file.path;
perr.showStack = false;
return perr;
}
module.exports = curry(createError);

View File

@ -0,0 +1,13 @@
'use strict';
var makeErrorCause = require('make-error-cause');
var gulpUglifyError = makeErrorCause('GulpUglifyError');
gulpUglifyError.prototype.toString = function() {
var cause = this.cause || {};
return makeErrorCause.BaseError.prototype.toString.call(this) +
(this.fileName ? '\nFile: ' + this.fileName : '') +
(cause.line ? '\nLine: ' + cause.line : '');
};
module.exports = gulpUglifyError;

18
static/js/ketcher2/node_modules/gulp-uglify/lib/log.js generated vendored Normal file
View File

@ -0,0 +1,18 @@
'use strict';
var hasLog = require('has-gulplog');
var each = require('lodash/fp/forEach');
var levels = ['debug', 'info', 'warn', 'error'];
each(
function(level) {
module.exports[level] = function() {
if (hasLog()) {
var log = require('gulplog');
log[level].apply(log, arguments);
}
};
},
levels
);

107
static/js/ketcher2/node_modules/gulp-uglify/minifier.js generated vendored Normal file
View File

@ -0,0 +1,107 @@
'use strict';
var through = require('through2');
var applySourceMap = require('vinyl-sourcemaps-apply');
var saveLicense = require('uglify-save-license');
var isObject = require('lodash/fp/isObject');
var zipObject = require('lodash/fp/zipObject');
var map = require('lodash/fp/map');
var prop = require('lodash/fp/prop');
var _ = require('lodash/fp/placeholder');
var defaultsDeep = require('lodash/fp/defaultsDeep');
var log = require('./lib/log');
var createError = require('./lib/create-error');
var GulpUglifyError = require('./lib/gulp-uglify-error');
var reSourceMapComment = /\n\/\/# sourceMappingURL=.+?$/;
var defaultOptions = defaultsDeep({
fromString: true,
output: {}
});
function trycatch(fn, handle) {
try {
return fn();
} catch (err) {
return handle(err);
}
}
function setup(opts) {
if (opts && !isObject(opts)) {
log.warn('gulp-uglify expects an object, non-object provided');
opts = {};
}
var options = defaultOptions(opts);
if (options.preserveComments === 'all') {
options.output.comments = true;
} else if (options.preserveComments === 'some') {
// Preserve comments with directives or that start with a bang (!)
options.output.comments = /^!|@preserve|@license|@cc_on/i;
} else if (options.preserveComments === 'license') {
options.output.comments = saveLicense;
} else if (typeof options.preserveComments === 'function') {
options.output.comments = options.preserveComments;
}
return options;
}
module.exports = function(opts, uglify) {
function minify(file, encoding, callback) {
var options = setup(opts || {});
var sources;
if (file.isNull()) {
return callback(null, file);
}
if (file.isStream()) {
return callback(createError(file, 'Streaming not supported', null));
}
if (file.sourceMap) {
// UglifyJS generates broken source maps if the input source map
// does not contain mappings.
if (file.sourceMap.mappings) {
options.inSourceMap = file.sourceMap;
}
options.outSourceMap = file.relative;
sources = zipObject(
file.sourceMap.sources,
file.sourceMap.sourcesContent
);
}
var mangled = trycatch(
function() {
var map = {};
map[file.relative] = String(file.contents);
var m = uglify.minify(map, options);
m.code = new Buffer(m.code.replace(reSourceMapComment, ''));
return m;
},
createError(file, 'unable to minify JavaScript')
);
if (mangled instanceof GulpUglifyError) {
return callback(mangled);
}
file.contents = mangled.code;
if (file.sourceMap) {
var sourceMap = JSON.parse(mangled.map);
sourceMap.sourcesContent = map(prop(_, sources), sourceMap.sources);
applySourceMap(file, sourceMap);
}
callback(null, file);
}
return through.obj(minify);
};

View File

@ -0,0 +1,119 @@
{
"_from": "gulp-uglify@2.1.2",
"_id": "gulp-uglify@2.1.2",
"_inBundle": false,
"_integrity": "sha1-bbhbHQ7mPRgFhZK2WGSdZcLsRUE=",
"_location": "/gulp-uglify",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "gulp-uglify@2.1.2",
"name": "gulp-uglify",
"escapedName": "gulp-uglify",
"rawSpec": "2.1.2",
"saveSpec": null,
"fetchSpec": "2.1.2"
},
"_requiredBy": [
"#DEV:/"
],
"_resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-2.1.2.tgz",
"_shasum": "6db85b1d0ee63d18058592b658649d65c2ec4541",
"_spec": "gulp-uglify@2.1.2",
"_where": "/home/manfred/enviPath/ketcher2/ketcher",
"author": {
"name": "Terin Stock",
"email": "terinjokes@gmail.com"
},
"bugs": {
"url": "https://github.com/terinjokes/gulp-uglify/issues"
},
"bundleDependencies": false,
"dependencies": {
"gulplog": "^1.0.0",
"has-gulplog": "^0.1.0",
"lodash": "^4.13.1",
"make-error-cause": "^1.1.1",
"through2": "^2.0.0",
"uglify-js": "~2.8.10",
"uglify-save-license": "^0.4.1",
"vinyl-sourcemaps-apply": "^0.2.0"
},
"deprecated": false,
"description": "Minify files with UglifyJS.",
"devDependencies": {
"coveralls": "^2.11.4",
"eslint": "^3.18.0",
"eslint-config-prettier": "^1.5.0",
"eslint-config-xo": "^0.18.1",
"eslint-plugin-no-use-extend-native": "^0.3.12",
"eslint-plugin-prettier": "^2.0.1",
"eslint-plugin-unicorn": "^2.1.0",
"gulp-concat": "^2.0.0",
"gulp-sourcemaps": "^1.0.0",
"intelli-espower-loader": "^1.0.1",
"istanbul": "^0.4.0",
"mississippi": "^1.2.0",
"mocha": "^3.0.1",
"power-assert": "^1.4.1",
"prettier": "^0.22.0",
"semver": "^5.3.0",
"tape": "^4.0.0",
"testdouble": "^1.6.0",
"vinyl": "^2.0.0"
},
"eslintConfig": {
"env": {
"node": true
},
"extends": [
"xo",
"prettier"
],
"plugins": [
"unicorn",
"no-use-extend-native",
"prettier"
],
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 80,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false
}
]
}
},
"files": [
"index.js",
"minifier.js",
"lib/"
],
"greenkeeper": {
"ignore": [
"gulp-sourcemaps"
]
},
"homepage": "https://github.com/terinjokes/gulp-uglify/",
"keywords": [
"gulpplugin"
],
"license": "MIT",
"main": "index.js",
"name": "gulp-uglify",
"repository": {
"type": "git",
"url": "git+https://github.com/terinjokes/gulp-uglify.git"
},
"scripts": {
"coverage": "cat ./coverage/lcov.info | coveralls",
"lint": "eslint *.js lib test",
"test": "mocha --require intelli-espower-loader"
},
"version": "2.1.2"
}