forked from enviPath/enviPy
Current Dev State
This commit is contained in:
233
static/js/ketcher2/node_modules/gulp/CHANGELOG.md
generated
vendored
Normal file
233
static/js/ketcher2/node_modules/gulp/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,233 @@
|
||||
# gulp changelog
|
||||
|
||||
## 3.9.0
|
||||
|
||||
- add babel support
|
||||
- add transpiler fallback support
|
||||
- add support for some renamed transpilers (livescript, etc)
|
||||
- add JSCS
|
||||
- update dependecies (liftoff, interpret)
|
||||
- documentation tweaks
|
||||
|
||||
## 3.8.11
|
||||
|
||||
- fix node 0.12/iojs problems
|
||||
- add node 0.12 and iojs to travis
|
||||
- update dependencies (liftoff, v8flags)
|
||||
- documentation tweaks
|
||||
|
||||
## 3.8.10
|
||||
|
||||
- add link to spanish docs
|
||||
- update dependencies (archy, semver, mocha, etc)
|
||||
- documentation tweaks
|
||||
|
||||
## 3.8.9
|
||||
|
||||
- fix local version undefined output
|
||||
- add completion for fish shell
|
||||
- fix powershell completion line splitting
|
||||
- add support for arbitrary node flags (oops, should have been a minor bump)
|
||||
- add v8flags dependency
|
||||
- update dependencies (liftoff)
|
||||
- documentation tweaks
|
||||
|
||||
## 3.8.8
|
||||
|
||||
- update dependencies (minimist, tildify)
|
||||
- documentation tweaks
|
||||
|
||||
## 3.8.7
|
||||
|
||||
- handle errors a bit better
|
||||
- update dependencies (gulp-util, semver, etc)
|
||||
- documentation tweaks
|
||||
|
||||
## 3.8.6
|
||||
|
||||
- remove executable flag from LICENSE
|
||||
- update dependencies (chalk, minimist, liftoff, etc)
|
||||
- documentation tweaks
|
||||
|
||||
## 3.8.5
|
||||
|
||||
- simplify --silent and --tasks-simple
|
||||
- fix bug in autocomplete where errors would come out
|
||||
|
||||
## 3.8.4
|
||||
|
||||
- CLI will use exit code 1 on exit when any task fails during the lifetime of the process
|
||||
|
||||
|
||||
## 3.8.3
|
||||
|
||||
- Tweak error formatting to work better with PluginErrors and strings
|
||||
|
||||
## 3.8.2
|
||||
|
||||
- add manpage generation
|
||||
|
||||
## 3.8.1
|
||||
|
||||
- the CLI now adds process.env.INIT_CWD which is the original cwd it was launched from
|
||||
|
||||
## 3.8.0
|
||||
|
||||
- update vinyl-fs
|
||||
- gulp.src is now a writable passthrough, this means you can use it to add files to your pipeline at any point
|
||||
- gulp.dest can now take a function to determine the folder
|
||||
|
||||
This is now possible!
|
||||
|
||||
```js
|
||||
gulp.src('lib/*.js')
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.src('styles/*.css'))
|
||||
.pipe(gulp.dest(function(file){
|
||||
// I don't know, you can do something cool here
|
||||
return 'build/whatever';
|
||||
}));
|
||||
```
|
||||
|
||||
## 3.7.0
|
||||
|
||||
- update vinyl-fs to remove BOM from UTF8 files
|
||||
- add --tasks-simple flag for plaintext task listings
|
||||
- updated autocomplete scripts to be simpler and use new --tasks-simple flag
|
||||
- added support for transpilers via liftoff 0.11 and interpret
|
||||
- just npm install your compiler (coffee-script for example) and it will work out of the box
|
||||
|
||||
## 3.5.5
|
||||
|
||||
- update deps
|
||||
- gulp.dest now support mode option, uses source file mode by default (file.stat.mode)
|
||||
- use chalk for colors in bin
|
||||
- update gulp.env deprecation msg to be more helpful
|
||||
|
||||
|
||||
## 3.5.2
|
||||
|
||||
- add -V for version on CLI (unix standard)
|
||||
- -v is deprecated, use -V
|
||||
- add -T as an alias for --tasks
|
||||
- documentation
|
||||
|
||||
## 3.5
|
||||
|
||||
- added `gulp.watch(globs, tasksArray)` sugar
|
||||
- remove gulp.taskQueue
|
||||
- deprecate gulp.run
|
||||
- deprecate gulp.env
|
||||
- add engineStrict to prevent people with node < 0.9 from installing
|
||||
|
||||
## 3.4
|
||||
|
||||
- added `--tasks` that prints out the tree of tasks + deps
|
||||
- global cli + local install mismatch is no longer fatal
|
||||
- remove tests for fs stuff
|
||||
- switch core src, dest, and watch to vinyl-fs
|
||||
- internal cleaning
|
||||
|
||||
## 3.3.4
|
||||
|
||||
- `--base` is now `--cwd`
|
||||
|
||||
## 3.3.3
|
||||
|
||||
- support for `--base` CLI arg to change where the search for gulpfile/`--require`s starts
|
||||
- support for `--gulpfile` CLI arg to point to a gulpfile specifically
|
||||
|
||||
## 3.3.0
|
||||
|
||||
- file.contents streams are no longer paused coming out of src
|
||||
- dest now passes files through before they are empty to fix passing to multiple dests
|
||||
|
||||
## 3.2.4
|
||||
|
||||
- Bug fix - we didn't have any CLI tests
|
||||
|
||||
## 3.2.3
|
||||
|
||||
- Update dependencies for bug fixes
|
||||
- autocomplete stuff in the completion folder
|
||||
|
||||
## 3.2
|
||||
|
||||
- File object is now [vinyl](https://github.com/wearefractal/vinyl)
|
||||
- .watch() is now [glob-watcher](https://github.com/wearefractal/glob-watcher)
|
||||
- Fix CLI -v when no gulpfile found
|
||||
- gulp-util updated
|
||||
- Logging moved to CLI bin file
|
||||
- Will cause double logging if you update global CLI to 3.2 but not local
|
||||
- Will cause no logging if you update local to 3.1 but not global CLI
|
||||
- Drop support for < 0.9
|
||||
|
||||
## 3.1.3
|
||||
|
||||
- Move isStream and isBuffer to gulp-util
|
||||
|
||||
## 3.1
|
||||
|
||||
- Move file class to gulp-util
|
||||
|
||||
## 3.0
|
||||
|
||||
- Ability to pass multiple globs and glob negations to glob-stream
|
||||
- Breaking change to the way glob-stream works
|
||||
- File object is now a class
|
||||
- file.shortened changed to file.relative
|
||||
- file.cwd added
|
||||
- Break out getStats to avoid nesting
|
||||
- Major code reorganization
|
||||
|
||||
## 2.7
|
||||
|
||||
- Breaking change to the way options are passed to glob-stream
|
||||
- Introduce new File object to ease pain of computing shortened names (now a getter)
|
||||
|
||||
## 2.4 - 2.6
|
||||
|
||||
- Moved stuff to gulp-util
|
||||
- Quit exposing createGlobStream (just use the glob-stream module)
|
||||
- More logging
|
||||
- Prettier time durations
|
||||
- Tons of documentation changes
|
||||
- gulp.trigger(tasks...) as a through stream
|
||||
|
||||
## 1.2-2.4 (11/12/13)
|
||||
|
||||
- src buffer=false fixed for 0.8 and 0.9 (remember to .resume() on these versions before consuming)
|
||||
- CLI completely rewritten
|
||||
- Colorful logging
|
||||
- Uses local version of gulp to run tasks
|
||||
- Uses findup to locate gulpfile (so you can run it anywhere in your project)
|
||||
- chdir to gulpfile directory before loading it
|
||||
- Correct exit codes on errors
|
||||
- silent flag added to gulp to disable logging
|
||||
- Fixes to task orchestration (3rd party)
|
||||
- Better support for globbed directories (thanks @robrich)
|
||||
|
||||
## 1.2 (10/28/13)
|
||||
|
||||
- Can specify buffer=false on src streams to make file.content a stream
|
||||
- Can specify read=false on src streams to disable file.content
|
||||
|
||||
## 1.1 (10/21/13)
|
||||
|
||||
- Can specify run callback
|
||||
- Can specify task dependencies
|
||||
- Tasks can accept callback or return promise
|
||||
- `gulp.verbose` exposes run-time internals
|
||||
|
||||
## 1.0 (9/26/13)
|
||||
|
||||
- Specify dependency versions
|
||||
- Updated docs
|
||||
|
||||
## 0.2 (8/6/13)
|
||||
|
||||
- Rename .files() to .src() and .folder() to .dest()
|
||||
|
||||
## 0.1 (7/18/13)
|
||||
|
||||
- Initial Release
|
||||
22
static/js/ketcher2/node_modules/gulp/LICENSE
generated
vendored
Normal file
22
static/js/ketcher2/node_modules/gulp/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2016 Fractal <contact@wearefractal.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.
|
||||
103
static/js/ketcher2/node_modules/gulp/README.md
generated
vendored
Normal file
103
static/js/ketcher2/node_modules/gulp/README.md
generated
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
<p align="center">
|
||||
<a href="http://gulpjs.com">
|
||||
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
||||
</a>
|
||||
<p align="center">The streaming build system</p>
|
||||
</p>
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
||||
|
||||
## What is gulp?
|
||||
|
||||
- **Automation** - gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow.
|
||||
- **Platform-agnostic** - Integrations are built into all major IDEs and people are using gulp with PHP, .NET, Node.js, Java, and other platforms.
|
||||
- **Strong Ecosystem** - Use npm modules to do anything you want + over 2000 curated plugins for streaming file transformations
|
||||
- **Simple** - By providing only a minimal API surface, gulp is easy to learn and simple to use
|
||||
|
||||
## Documentation
|
||||
|
||||
For a Getting started guide, API docs, recipes, making a plugin, etc. check out or docs!
|
||||
|
||||
- Need something reliable? Check out the [documentation for the current release](/docs/README.md)!
|
||||
- Want to help us test the latest and greatest? Check out the [documentation for the next release](https://github.com/gulpjs/gulp/tree/4.0)!
|
||||
|
||||
## Sample `gulpfile.js`
|
||||
|
||||
This file will give you a taste of what gulp does.
|
||||
|
||||
```js
|
||||
var gulp = require('gulp');
|
||||
var coffee = require('gulp-coffee');
|
||||
var concat = require('gulp-concat');
|
||||
var uglify = require('gulp-uglify');
|
||||
var imagemin = require('gulp-imagemin');
|
||||
var sourcemaps = require('gulp-sourcemaps');
|
||||
var del = require('del');
|
||||
|
||||
var paths = {
|
||||
scripts: ['client/js/**/*.coffee', '!client/external/**/*.coffee'],
|
||||
images: 'client/img/**/*'
|
||||
};
|
||||
|
||||
// Not all tasks need to use streams
|
||||
// A gulpfile is just another node program and you can use any package available on npm
|
||||
gulp.task('clean', function() {
|
||||
// You can use multiple globbing patterns as you would with `gulp.src`
|
||||
return del(['build']);
|
||||
});
|
||||
|
||||
gulp.task('scripts', ['clean'], function() {
|
||||
// Minify and copy all JavaScript (except vendor scripts)
|
||||
// with sourcemaps all the way down
|
||||
return gulp.src(paths.scripts)
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(coffee())
|
||||
.pipe(uglify())
|
||||
.pipe(concat('all.min.js'))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('build/js'));
|
||||
});
|
||||
|
||||
// Copy all static images
|
||||
gulp.task('images', ['clean'], function() {
|
||||
return gulp.src(paths.images)
|
||||
// Pass in options to the task
|
||||
.pipe(imagemin({optimizationLevel: 5}))
|
||||
.pipe(gulp.dest('build/img'));
|
||||
});
|
||||
|
||||
// Rerun the task when a file changes
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(paths.scripts, ['scripts']);
|
||||
gulp.watch(paths.images, ['images']);
|
||||
});
|
||||
|
||||
// The default task (called when you run `gulp` from cli)
|
||||
gulp.task('default', ['watch', 'scripts', 'images']);
|
||||
```
|
||||
|
||||
## Incremental Builds
|
||||
|
||||
We recommend these plugins:
|
||||
|
||||
- [gulp-changed](https://github.com/sindresorhus/gulp-changed) - only pass through changed files
|
||||
- [gulp-cached](https://github.com/contra/gulp-cached) - in-memory file cache, not for operation on sets of files
|
||||
- [gulp-remember](https://github.com/ahaurw01/gulp-remember) - pairs nicely with gulp-cached
|
||||
- [gulp-newer](https://github.com/tschaub/gulp-newer) - pass through newer source files only, supports many:1 source:dest
|
||||
|
||||
## Want to contribute?
|
||||
|
||||
Anyone can help make this project better - check out our [Contributing guide](/CONTRIBUTING.md)!
|
||||
|
||||
[downloads-image]: https://img.shields.io/npm/dm/gulp.svg
|
||||
[npm-url]: https://www.npmjs.com/package/gulp
|
||||
[npm-image]: https://img.shields.io/npm/v/gulp.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/gulp
|
||||
[travis-image]: https://img.shields.io/travis/gulpjs/gulp.svg
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/gulp
|
||||
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
|
||||
212
static/js/ketcher2/node_modules/gulp/bin/gulp.js
generated
vendored
Executable file
212
static/js/ketcher2/node_modules/gulp/bin/gulp.js
generated
vendored
Executable file
@ -0,0 +1,212 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
var gutil = require('gulp-util');
|
||||
var prettyTime = require('pretty-hrtime');
|
||||
var chalk = require('chalk');
|
||||
var semver = require('semver');
|
||||
var archy = require('archy');
|
||||
var Liftoff = require('liftoff');
|
||||
var tildify = require('tildify');
|
||||
var interpret = require('interpret');
|
||||
var v8flags = require('v8flags');
|
||||
var completion = require('../lib/completion');
|
||||
var argv = require('minimist')(process.argv.slice(2));
|
||||
var taskTree = require('../lib/taskTree');
|
||||
|
||||
// Set env var for ORIGINAL cwd
|
||||
// before anything touches it
|
||||
process.env.INIT_CWD = process.cwd();
|
||||
|
||||
var cli = new Liftoff({
|
||||
name: 'gulp',
|
||||
completions: completion,
|
||||
extensions: interpret.jsVariants,
|
||||
v8flags: v8flags,
|
||||
});
|
||||
|
||||
// Exit with 0 or 1
|
||||
var failed = false;
|
||||
process.once('exit', function(code) {
|
||||
if (code === 0 && failed) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
// Parse those args m8
|
||||
var cliPackage = require('../package');
|
||||
var versionFlag = argv.v || argv.version;
|
||||
var tasksFlag = argv.T || argv.tasks;
|
||||
var tasks = argv._;
|
||||
var toRun = tasks.length ? tasks : ['default'];
|
||||
|
||||
// This is a hold-over until we have a better logging system
|
||||
// with log levels
|
||||
var simpleTasksFlag = argv['tasks-simple'];
|
||||
var shouldLog = !argv.silent && !simpleTasksFlag;
|
||||
|
||||
if (!shouldLog) {
|
||||
gutil.log = function() {};
|
||||
}
|
||||
|
||||
cli.on('require', function(name) {
|
||||
gutil.log('Requiring external module', chalk.magenta(name));
|
||||
});
|
||||
|
||||
cli.on('requireFail', function(name) {
|
||||
gutil.log(chalk.red('Failed to load external module'), chalk.magenta(name));
|
||||
});
|
||||
|
||||
cli.on('respawn', function(flags, child) {
|
||||
var nodeFlags = chalk.magenta(flags.join(', '));
|
||||
var pid = chalk.magenta(child.pid);
|
||||
gutil.log('Node flags detected:', nodeFlags);
|
||||
gutil.log('Respawned to PID:', pid);
|
||||
});
|
||||
|
||||
cli.launch({
|
||||
cwd: argv.cwd,
|
||||
configPath: argv.gulpfile,
|
||||
require: argv.require,
|
||||
completion: argv.completion,
|
||||
}, handleArguments);
|
||||
|
||||
// The actual logic
|
||||
function handleArguments(env) {
|
||||
if (versionFlag && tasks.length === 0) {
|
||||
gutil.log('CLI version', cliPackage.version);
|
||||
if (env.modulePackage && typeof env.modulePackage.version !== 'undefined') {
|
||||
gutil.log('Local version', env.modulePackage.version);
|
||||
}
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (!env.modulePath) {
|
||||
gutil.log(
|
||||
chalk.red('Local gulp not found in'),
|
||||
chalk.magenta(tildify(env.cwd))
|
||||
);
|
||||
gutil.log(chalk.red('Try running: npm install gulp'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (!env.configPath) {
|
||||
gutil.log(chalk.red('No gulpfile found'));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Check for semver difference between cli and local installation
|
||||
if (semver.gt(cliPackage.version, env.modulePackage.version)) {
|
||||
gutil.log(chalk.red('Warning: gulp version mismatch:'));
|
||||
gutil.log(chalk.red('Global gulp is', cliPackage.version));
|
||||
gutil.log(chalk.red('Local gulp is', env.modulePackage.version));
|
||||
}
|
||||
|
||||
// Chdir before requiring gulpfile to make sure
|
||||
// we let them chdir as needed
|
||||
if (process.cwd() !== env.cwd) {
|
||||
process.chdir(env.cwd);
|
||||
gutil.log(
|
||||
'Working directory changed to',
|
||||
chalk.magenta(tildify(env.cwd))
|
||||
);
|
||||
}
|
||||
|
||||
// This is what actually loads up the gulpfile
|
||||
require(env.configPath);
|
||||
gutil.log('Using gulpfile', chalk.magenta(tildify(env.configPath)));
|
||||
|
||||
var gulpInst = require(env.modulePath);
|
||||
logEvents(gulpInst);
|
||||
|
||||
process.nextTick(function() {
|
||||
if (simpleTasksFlag) {
|
||||
return logTasksSimple(env, gulpInst);
|
||||
}
|
||||
if (tasksFlag) {
|
||||
return logTasks(env, gulpInst);
|
||||
}
|
||||
gulpInst.start.apply(gulpInst, toRun);
|
||||
});
|
||||
}
|
||||
|
||||
function logTasks(env, localGulp) {
|
||||
var tree = taskTree(localGulp.tasks);
|
||||
tree.label = 'Tasks for ' + chalk.magenta(tildify(env.configPath));
|
||||
archy(tree)
|
||||
.split('\n')
|
||||
.forEach(function(v) {
|
||||
if (v.trim().length === 0) {
|
||||
return;
|
||||
}
|
||||
gutil.log(v);
|
||||
});
|
||||
}
|
||||
|
||||
function logTasksSimple(env, localGulp) {
|
||||
console.log(Object.keys(localGulp.tasks)
|
||||
.join('\n')
|
||||
.trim());
|
||||
}
|
||||
|
||||
// Format orchestrator errors
|
||||
function formatError(e) {
|
||||
if (!e.err) {
|
||||
return e.message;
|
||||
}
|
||||
|
||||
// PluginError
|
||||
if (typeof e.err.showStack === 'boolean') {
|
||||
return e.err.toString();
|
||||
}
|
||||
|
||||
// Normal error
|
||||
if (e.err.stack) {
|
||||
return e.err.stack;
|
||||
}
|
||||
|
||||
// Unknown (string, number, etc.)
|
||||
return new Error(String(e.err)).stack;
|
||||
}
|
||||
|
||||
// Wire up logging events
|
||||
function logEvents(gulpInst) {
|
||||
|
||||
// Total hack due to poor error management in orchestrator
|
||||
gulpInst.on('err', function() {
|
||||
failed = true;
|
||||
});
|
||||
|
||||
gulpInst.on('task_start', function(e) {
|
||||
// TODO: batch these
|
||||
// so when 5 tasks start at once it only logs one time with all 5
|
||||
gutil.log('Starting', '\'' + chalk.cyan(e.task) + '\'...');
|
||||
});
|
||||
|
||||
gulpInst.on('task_stop', function(e) {
|
||||
var time = prettyTime(e.hrDuration);
|
||||
gutil.log(
|
||||
'Finished', '\'' + chalk.cyan(e.task) + '\'',
|
||||
'after', chalk.magenta(time)
|
||||
);
|
||||
});
|
||||
|
||||
gulpInst.on('task_err', function(e) {
|
||||
var msg = formatError(e);
|
||||
var time = prettyTime(e.hrDuration);
|
||||
gutil.log(
|
||||
'\'' + chalk.cyan(e.task) + '\'',
|
||||
chalk.red('errored after'),
|
||||
chalk.magenta(time)
|
||||
);
|
||||
gutil.log(msg);
|
||||
});
|
||||
|
||||
gulpInst.on('task_not_found', function(err) {
|
||||
gutil.log(
|
||||
chalk.red('Task \'' + err.task + '\' is not in your gulpfile')
|
||||
);
|
||||
gutil.log('Please check the documentation for proper gulpfile formatting');
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
20
static/js/ketcher2/node_modules/gulp/completion/README.md
generated
vendored
Normal file
20
static/js/ketcher2/node_modules/gulp/completion/README.md
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# Completion for gulp
|
||||
> Thanks to grunt team and Tyler Kellen
|
||||
|
||||
To enable tasks auto-completion in shell you should add `eval "$(gulp --completion=shell)"` in your `.shellrc` file.
|
||||
|
||||
## Bash
|
||||
|
||||
Add `eval "$(gulp --completion=bash)"` to `~/.bashrc`.
|
||||
|
||||
## Zsh
|
||||
|
||||
Add `eval "$(gulp --completion=zsh)"` to `~/.zshrc`.
|
||||
|
||||
## Powershell
|
||||
|
||||
Add `Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)` to `$PROFILE`.
|
||||
|
||||
## Fish
|
||||
|
||||
Add `gulp --completion=fish | source` to `~/.config/fish/config.fish`.
|
||||
27
static/js/ketcher2/node_modules/gulp/completion/bash
generated
vendored
Normal file
27
static/js/ketcher2/node_modules/gulp/completion/bash
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Borrowed from grunt-cli
|
||||
# http://gruntjs.com/
|
||||
#
|
||||
# Copyright (c) 2012 Tyler Kellen, contributors
|
||||
# Licensed under the MIT license.
|
||||
# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# To enable bash <tab> completion for gulp, add the following line (minus the
|
||||
# leading #, which is the bash comment character) to your ~/.bashrc file:
|
||||
#
|
||||
# eval "$(gulp --completion=bash)"
|
||||
|
||||
# Enable bash autocompletion.
|
||||
function _gulp_completions() {
|
||||
# The currently-being-completed word.
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
#Grab tasks
|
||||
local compls=$(gulp --tasks-simple)
|
||||
# Tell complete what stuff to show.
|
||||
COMPREPLY=($(compgen -W "$compls" -- "$cur"))
|
||||
}
|
||||
|
||||
complete -o default -F _gulp_completions gulp
|
||||
10
static/js/ketcher2/node_modules/gulp/completion/fish
generated
vendored
Normal file
10
static/js/ketcher2/node_modules/gulp/completion/fish
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# To enable fish <tab> completion for gulp, add the following line to
|
||||
# your ~/.config/fish/config.fish file:
|
||||
#
|
||||
# gulp --completion=fish | source
|
||||
|
||||
complete -c gulp -a "(gulp --tasks-simple)" -f
|
||||
61
static/js/ketcher2/node_modules/gulp/completion/powershell
generated
vendored
Normal file
61
static/js/ketcher2/node_modules/gulp/completion/powershell
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# Copyright (c) 2014 Jason Jarrett
|
||||
#
|
||||
# Tab completion for the `gulp`
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# To enable powershell <tab> completion for gulp you need to be running
|
||||
# at least PowerShell v3 or greater and add the below to your $PROFILE
|
||||
#
|
||||
# Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine)
|
||||
#
|
||||
#
|
||||
|
||||
$gulp_completion_Process = {
|
||||
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
|
||||
|
||||
|
||||
# Load up an assembly to read the gulpfile's sha1
|
||||
if(-not $global:GulpSHA1Managed) {
|
||||
[Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null
|
||||
$global:GulpSHA1Managed = new-Object System.Security.Cryptography.SHA1Managed
|
||||
}
|
||||
|
||||
# setup a global (in-memory) cache
|
||||
if(-not $global:GulpfileShaCache) {
|
||||
$global:GulpfileShaCache = @{};
|
||||
}
|
||||
|
||||
$cache = $global:GulpfileShaCache;
|
||||
|
||||
# Get the gulpfile's sha1
|
||||
$sha1gulpFile = (resolve-path gulpfile.js -ErrorAction Ignore | %{
|
||||
$file = [System.IO.File]::Open($_.Path, "open", "read")
|
||||
[string]::join('', ($global:GulpSHA1Managed.ComputeHash($file) | %{ $_.ToString("x2") }))
|
||||
$file.Dispose()
|
||||
})
|
||||
|
||||
# lookup the sha1 for previously cached task lists.
|
||||
if($cache.ContainsKey($sha1gulpFile)){
|
||||
$tasks = $cache[$sha1gulpFile];
|
||||
} else {
|
||||
$tasks = (gulp --tasks-simple).split("`n");
|
||||
$cache[$sha1gulpFile] = $tasks;
|
||||
}
|
||||
|
||||
|
||||
$tasks |
|
||||
where { $_.startswith($commandName) }
|
||||
Sort-Object |
|
||||
foreach { New-Object System.Management.Automation.CompletionResult $_, $_, 'ParameterValue', ('{0}' -f $_) }
|
||||
}
|
||||
|
||||
if (-not $global:options) {
|
||||
$global:options = @{
|
||||
CustomArgumentCompleters = @{};
|
||||
NativeArgumentCompleters = @{}
|
||||
}
|
||||
}
|
||||
|
||||
$global:options['NativeArgumentCompleters']['gulp'] = $gulp_completion_Process
|
||||
$function:tabexpansion2 = $function:tabexpansion2 -replace 'End\r\n{','End { if ($null -ne $options) { $options += $global:options} else {$options = $global:options}'
|
||||
25
static/js/ketcher2/node_modules/gulp/completion/zsh
generated
vendored
Normal file
25
static/js/ketcher2/node_modules/gulp/completion/zsh
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# Borrowed from grunt-cli
|
||||
# http://gruntjs.com/
|
||||
#
|
||||
# Copyright (c) 2012 Tyler Kellen, contributors
|
||||
# Licensed under the MIT license.
|
||||
# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# To enable zsh <tab> completion for gulp, add the following line (minus the
|
||||
# leading #, which is the zsh comment character) to your ~/.zshrc file:
|
||||
#
|
||||
# eval "$(gulp --completion=zsh)"
|
||||
|
||||
# Enable zsh autocompletion.
|
||||
function _gulp_completion() {
|
||||
# Grab tasks
|
||||
compls=$(gulp --tasks-simple)
|
||||
completions=(${=compls})
|
||||
compadd -- $completions
|
||||
}
|
||||
|
||||
compdef _gulp_completion gulp
|
||||
40
static/js/ketcher2/node_modules/gulp/gulp.1
generated
vendored
Normal file
40
static/js/ketcher2/node_modules/gulp/gulp.1
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
.TH "GULP" "" "February 2016" "" ""
|
||||
.SH "NAME"
|
||||
\fBgulp\fR
|
||||
.SH gulp CLI docs
|
||||
.SS Flags
|
||||
.P
|
||||
gulp has very few flags to know about\. All other flags are for tasks to use if needed\.
|
||||
.RS 0
|
||||
.IP \(bu 2
|
||||
\fB\-v\fP or \fB\-\-version\fP will display the global and local gulp versions
|
||||
.IP \(bu 2
|
||||
\fB\-\-require <module path>\fP will require a module before running the gulpfile\. This is useful for transpilers but also has other applications\. You can use multiple \fB\-\-require\fP flags
|
||||
.IP \(bu 2
|
||||
\fB\-\-gulpfile <gulpfile path>\fP will manually set path of gulpfile\. Useful if you have multiple gulpfiles\. This will set the CWD to the gulpfile directory as well
|
||||
.IP \(bu 2
|
||||
\fB\-\-cwd <dir path>\fP will manually set the CWD\. The search for the gulpfile, as well as the relativity of all requires will be from here
|
||||
.IP \(bu 2
|
||||
\fB\-T\fP or \fB\-\-tasks\fP will display the task dependency tree for the loaded gulpfile
|
||||
.IP \(bu 2
|
||||
\fB\-\-tasks\-simple\fP will display a plaintext list of tasks for the loaded gulpfile
|
||||
.IP \(bu 2
|
||||
\fB\-\-color\fP will force gulp and gulp plugins to display colors even when no color support is detected
|
||||
.IP \(bu 2
|
||||
\fB\-\-no\-color\fP will force gulp and gulp plugins to not display colors even when color support is detected
|
||||
.IP \(bu 2
|
||||
\fB\-\-silent\fP will disable all gulp logging
|
||||
|
||||
.RE
|
||||
.P
|
||||
The CLI adds process\.env\.INIT_CWD which is the original cwd it was launched from\.
|
||||
.SS Task specific flags
|
||||
.P
|
||||
Refer to this StackOverflow \fIhttp://stackoverflow\.com/questions/23023650/is\-it\-possible\-to\-pass\-a\-flag\-to\-gulp\-to\-have\-it\-run\-tasks\-in\-different\-ways\fR link for how to add task specific flags
|
||||
.SS Tasks
|
||||
.P
|
||||
Tasks can be executed by running \fBgulp <task> <othertask>\fP\|\. Just running \fBgulp\fP will execute the task you registered called \fBdefault\fP\|\. If there is no \fBdefault\fP task gulp will error\.
|
||||
.SS Compilers
|
||||
.P
|
||||
You can find a list of supported languages at interpret \fIhttps://github\.com/tkellen/node\-interpret#jsvariants\fR\|\. If you would like to add support for a new language send pull request/open issues there\.
|
||||
|
||||
63
static/js/ketcher2/node_modules/gulp/index.js
generated
vendored
Normal file
63
static/js/ketcher2/node_modules/gulp/index.js
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
'use strict';
|
||||
|
||||
var util = require('util');
|
||||
var Orchestrator = require('orchestrator');
|
||||
var gutil = require('gulp-util');
|
||||
var deprecated = require('deprecated');
|
||||
var vfs = require('vinyl-fs');
|
||||
|
||||
function Gulp() {
|
||||
Orchestrator.call(this);
|
||||
}
|
||||
util.inherits(Gulp, Orchestrator);
|
||||
|
||||
Gulp.prototype.task = Gulp.prototype.add;
|
||||
Gulp.prototype.run = function() {
|
||||
// `run()` is deprecated as of 3.5 and will be removed in 4.0
|
||||
// Use task dependencies instead
|
||||
|
||||
// Impose our opinion of "default" tasks onto orchestrator
|
||||
var tasks = arguments.length ? arguments : ['default'];
|
||||
|
||||
this.start.apply(this, tasks);
|
||||
};
|
||||
|
||||
Gulp.prototype.src = vfs.src;
|
||||
Gulp.prototype.dest = vfs.dest;
|
||||
Gulp.prototype.watch = function(glob, opt, fn) {
|
||||
if (typeof opt === 'function' || Array.isArray(opt)) {
|
||||
fn = opt;
|
||||
opt = null;
|
||||
}
|
||||
|
||||
// Array of tasks given
|
||||
if (Array.isArray(fn)) {
|
||||
return vfs.watch(glob, opt, function() {
|
||||
this.start.apply(this, fn);
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
return vfs.watch(glob, opt, fn);
|
||||
};
|
||||
|
||||
// Let people use this class from our instance
|
||||
Gulp.prototype.Gulp = Gulp;
|
||||
|
||||
// Deprecations
|
||||
deprecated.field('gulp.env has been deprecated. ' +
|
||||
'Use your own CLI parser instead. ' +
|
||||
'We recommend using yargs or minimist.',
|
||||
console.warn,
|
||||
Gulp.prototype,
|
||||
'env',
|
||||
gutil.env
|
||||
);
|
||||
|
||||
Gulp.prototype.run = deprecated.method('gulp.run() has been deprecated. ' +
|
||||
'Use task dependencies or gulp.watch task triggering instead.',
|
||||
console.warn,
|
||||
Gulp.prototype.run
|
||||
);
|
||||
|
||||
var inst = new Gulp();
|
||||
module.exports = inst;
|
||||
22
static/js/ketcher2/node_modules/gulp/lib/completion.js
generated
vendored
Normal file
22
static/js/ketcher2/node_modules/gulp/lib/completion.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
module.exports = function(name) {
|
||||
if (typeof name !== 'string') {
|
||||
throw new Error('Missing completion type');
|
||||
}
|
||||
var file = path.join(__dirname, '../completion', name);
|
||||
try {
|
||||
console.log(fs.readFileSync(file, 'utf8'));
|
||||
process.exit(0);
|
||||
} catch (err) {
|
||||
console.log(
|
||||
'echo "gulp autocompletion rules for',
|
||||
'\'' + name + '\'',
|
||||
'not found"'
|
||||
);
|
||||
process.exit(5);
|
||||
}
|
||||
};
|
||||
14
static/js/ketcher2/node_modules/gulp/lib/taskTree.js
generated
vendored
Normal file
14
static/js/ketcher2/node_modules/gulp/lib/taskTree.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function(tasks) {
|
||||
return Object.keys(tasks)
|
||||
.reduce(function(prev, task) {
|
||||
prev.nodes.push({
|
||||
label: task,
|
||||
nodes: tasks[task].dep,
|
||||
});
|
||||
return prev;
|
||||
}, {
|
||||
nodes: [],
|
||||
});
|
||||
};
|
||||
15
static/js/ketcher2/node_modules/gulp/node_modules/semver/LICENSE
generated
vendored
Normal file
15
static/js/ketcher2/node_modules/gulp/node_modules/semver/LICENSE
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
24
static/js/ketcher2/node_modules/gulp/node_modules/semver/Makefile
generated
vendored
Normal file
24
static/js/ketcher2/node_modules/gulp/node_modules/semver/Makefile
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
files = semver.browser.js \
|
||||
semver.min.js \
|
||||
semver.browser.js.gz \
|
||||
semver.min.js.gz
|
||||
|
||||
all: $(files)
|
||||
|
||||
clean:
|
||||
rm -f $(files)
|
||||
|
||||
semver.browser.js: head.js.txt semver.js foot.js.txt
|
||||
( cat head.js.txt; \
|
||||
cat semver.js | \
|
||||
egrep -v '^ *\/\* nomin \*\/' | \
|
||||
perl -pi -e 's/debug\([^\)]+\)//g'; \
|
||||
cat foot.js.txt ) > semver.browser.js
|
||||
|
||||
semver.min.js: semver.browser.js
|
||||
uglifyjs -m <semver.browser.js >semver.min.js
|
||||
|
||||
%.gz: %
|
||||
gzip --stdout -9 <$< >$@
|
||||
|
||||
.PHONY: all clean
|
||||
303
static/js/ketcher2/node_modules/gulp/node_modules/semver/README.md
generated
vendored
Normal file
303
static/js/ketcher2/node_modules/gulp/node_modules/semver/README.md
generated
vendored
Normal file
@ -0,0 +1,303 @@
|
||||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Usage
|
||||
|
||||
$ npm install semver
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
$ semver -h
|
||||
|
||||
Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv]
|
||||
Test if version(s) satisfy the supplied range(s), and sort them.
|
||||
|
||||
Multiple versions or ranges may be supplied, unless increment
|
||||
option is specified. In that case, only a single version may
|
||||
be used, and it is incremented by the specified level
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no versions are valid, or ranges are not satisfied,
|
||||
then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<http://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
> semver.inc('1.2.3', 'pre', 'beta')
|
||||
'1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```shell
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```shell
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero digit in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `loose` boolean argument that, if
|
||||
true, will be more forgiving about not-quite-valid semver strings.
|
||||
The resulting output will always be 100% strict, of course.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
133
static/js/ketcher2/node_modules/gulp/node_modules/semver/bin/semver
generated
vendored
Executable file
133
static/js/ketcher2/node_modules/gulp/node_modules/semver/bin/semver
generated
vendored
Executable file
@ -0,0 +1,133 @@
|
||||
#!/usr/bin/env node
|
||||
// Standalone semver comparison program.
|
||||
// Exits successfully and prints matching version(s) if
|
||||
// any supplied version is valid and passes all tests.
|
||||
|
||||
var argv = process.argv.slice(2)
|
||||
, versions = []
|
||||
, range = []
|
||||
, gt = []
|
||||
, lt = []
|
||||
, eq = []
|
||||
, inc = null
|
||||
, version = require("../package.json").version
|
||||
, loose = false
|
||||
, identifier = undefined
|
||||
, semver = require("../semver")
|
||||
, reverse = false
|
||||
|
||||
main()
|
||||
|
||||
function main () {
|
||||
if (!argv.length) return help()
|
||||
while (argv.length) {
|
||||
var a = argv.shift()
|
||||
var i = a.indexOf('=')
|
||||
if (i !== -1) {
|
||||
a = a.slice(0, i)
|
||||
argv.unshift(a.slice(i + 1))
|
||||
}
|
||||
switch (a) {
|
||||
case "-rv": case "-rev": case "--rev": case "--reverse":
|
||||
reverse = true
|
||||
break
|
||||
case "-l": case "--loose":
|
||||
loose = true
|
||||
break
|
||||
case "-v": case "--version":
|
||||
versions.push(argv.shift())
|
||||
break
|
||||
case "-i": case "--inc": case "--increment":
|
||||
switch (argv[0]) {
|
||||
case "major": case "minor": case "patch": case "prerelease":
|
||||
case "premajor": case "preminor": case "prepatch":
|
||||
inc = argv.shift()
|
||||
break
|
||||
default:
|
||||
inc = "patch"
|
||||
break
|
||||
}
|
||||
break
|
||||
case "--preid":
|
||||
identifier = argv.shift()
|
||||
break
|
||||
case "-r": case "--range":
|
||||
range.push(argv.shift())
|
||||
break
|
||||
case "-h": case "--help": case "-?":
|
||||
return help()
|
||||
default:
|
||||
versions.push(a)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.valid(v, loose)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
if (inc && (versions.length !== 1 || range.length))
|
||||
return failInc()
|
||||
|
||||
for (var i = 0, l = range.length; i < l ; i ++) {
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.satisfies(v, range[i], loose)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
}
|
||||
return success(versions)
|
||||
}
|
||||
|
||||
function failInc () {
|
||||
console.error("--inc can only be used on a single version with no range")
|
||||
fail()
|
||||
}
|
||||
|
||||
function fail () { process.exit(1) }
|
||||
|
||||
function success () {
|
||||
var compare = reverse ? "rcompare" : "compare"
|
||||
versions.sort(function (a, b) {
|
||||
return semver[compare](a, b, loose)
|
||||
}).map(function (v) {
|
||||
return semver.clean(v, loose)
|
||||
}).map(function (v) {
|
||||
return inc ? semver.inc(v, inc, loose, identifier) : v
|
||||
}).forEach(function (v,i,_) { console.log(v) })
|
||||
}
|
||||
|
||||
function help () {
|
||||
console.log(["SemVer " + version
|
||||
,""
|
||||
,"A JavaScript implementation of the http://semver.org/ specification"
|
||||
,"Copyright Isaac Z. Schlueter"
|
||||
,""
|
||||
,"Usage: semver [options] <version> [<version> [...]]"
|
||||
,"Prints valid versions sorted by SemVer precedence"
|
||||
,""
|
||||
,"Options:"
|
||||
,"-r --range <range>"
|
||||
," Print versions that match the specified range."
|
||||
,""
|
||||
,"-i --increment [<level>]"
|
||||
," Increment a version by the specified level. Level can"
|
||||
," be one of: major, minor, patch, premajor, preminor,"
|
||||
," prepatch, or prerelease. Default level is 'patch'."
|
||||
," Only one version may be specified."
|
||||
,""
|
||||
,"--preid <identifier>"
|
||||
," Identifier to be used to prefix premajor, preminor,"
|
||||
," prepatch or prerelease version increments."
|
||||
,""
|
||||
,"-l --loose"
|
||||
," Interpret versions and ranges loosely"
|
||||
,""
|
||||
,"Program exits successfully if any valid version satisfies"
|
||||
,"all supplied ranges, and prints all satisfying versions."
|
||||
,""
|
||||
,"If no satisfying versions are found, then exits failure."
|
||||
,""
|
||||
,"Versions are printed in ascending order, so supplying"
|
||||
,"multiple versions to the utility will just sort them."
|
||||
].join("\n"))
|
||||
}
|
||||
6
static/js/ketcher2/node_modules/gulp/node_modules/semver/foot.js.txt
generated
vendored
Normal file
6
static/js/ketcher2/node_modules/gulp/node_modules/semver/foot.js.txt
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
})(
|
||||
typeof exports === 'object' ? exports :
|
||||
typeof define === 'function' && define.amd ? {} :
|
||||
semver = {}
|
||||
);
|
||||
2
static/js/ketcher2/node_modules/gulp/node_modules/semver/head.js.txt
generated
vendored
Normal file
2
static/js/ketcher2/node_modules/gulp/node_modules/semver/head.js.txt
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
;(function(exports) {
|
||||
|
||||
53
static/js/ketcher2/node_modules/gulp/node_modules/semver/package.json
generated
vendored
Normal file
53
static/js/ketcher2/node_modules/gulp/node_modules/semver/package.json
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"_from": "semver@^4.1.0",
|
||||
"_id": "semver@4.3.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=",
|
||||
"_location": "/gulp/semver",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "semver@^4.1.0",
|
||||
"name": "semver",
|
||||
"escapedName": "semver",
|
||||
"rawSpec": "^4.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
|
||||
"_shasum": "300bc6e0e86374f7ba61068b5b1ecd57fc6532da",
|
||||
"_spec": "semver@^4.1.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/gulp",
|
||||
"bin": {
|
||||
"semver": "./bin/semver"
|
||||
},
|
||||
"browser": "semver.browser.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/npm/node-semver/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"devDependencies": {
|
||||
"tap": "^1.2.0",
|
||||
"uglify-js": "~2.3.6"
|
||||
},
|
||||
"homepage": "https://github.com/npm/node-semver#readme",
|
||||
"license": "ISC",
|
||||
"main": "semver.js",
|
||||
"min": "semver.min.js",
|
||||
"name": "semver",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/npm/node-semver.git"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "make",
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "4.3.6"
|
||||
}
|
||||
1201
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.browser.js
generated
vendored
Normal file
1201
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.browser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.browser.js.gz
generated
vendored
Normal file
BIN
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.browser.js.gz
generated
vendored
Normal file
Binary file not shown.
1205
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.js
generated
vendored
Normal file
1205
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.min.js
generated
vendored
Normal file
1
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.min.js.gz
generated
vendored
Normal file
BIN
static/js/ketcher2/node_modules/gulp/node_modules/semver/semver.min.js.gz
generated
vendored
Normal file
Binary file not shown.
15
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/amd.js
generated
vendored
Normal file
15
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/amd.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
var tap = require('tap');
|
||||
var test = tap.test;
|
||||
|
||||
test('amd', function(t) {
|
||||
global.define = define;
|
||||
define.amd = true;
|
||||
var defined = null;
|
||||
function define(stuff) {
|
||||
defined = stuff;
|
||||
}
|
||||
var fromRequire = require('../');
|
||||
t.ok(defined, 'amd function called');
|
||||
t.equal(fromRequire, defined, 'amd stuff same as require stuff');
|
||||
t.end();
|
||||
});
|
||||
31
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/big-numbers.js
generated
vendored
Normal file
31
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/big-numbers.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
var test = require('tap').test
|
||||
var semver = require('../')
|
||||
|
||||
test('long version is too long', function (t) {
|
||||
var v = '1.2.' + new Array(256).join('1')
|
||||
t.throws(function () {
|
||||
new semver.SemVer(v)
|
||||
})
|
||||
t.equal(semver.valid(v, false), null)
|
||||
t.equal(semver.valid(v, true), null)
|
||||
t.equal(semver.inc(v, 'patch'), null)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('big number is like too long version', function (t) {
|
||||
var v = '1.2.' + new Array(100).join('1')
|
||||
t.throws(function () {
|
||||
new semver.SemVer(v)
|
||||
})
|
||||
t.equal(semver.valid(v, false), null)
|
||||
t.equal(semver.valid(v, true), null)
|
||||
t.equal(semver.inc(v, 'patch'), null)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('parsing null does not throw', function (t) {
|
||||
t.equal(semver.parse(null), null)
|
||||
t.equal(semver.parse({}), null)
|
||||
t.equal(semver.parse(new semver.SemVer('1.2.3')).version, '1.2.3')
|
||||
t.end()
|
||||
})
|
||||
29
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/clean.js
generated
vendored
Normal file
29
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/clean.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
var tap = require('tap');
|
||||
var test = tap.test;
|
||||
var semver = require('../semver.js');
|
||||
var clean = semver.clean;
|
||||
|
||||
test('\nclean tests', function(t) {
|
||||
// [range, version]
|
||||
// Version should be detectable despite extra characters
|
||||
[
|
||||
['1.2.3', '1.2.3'],
|
||||
[' 1.2.3 ', '1.2.3'],
|
||||
[' 1.2.3-4 ', '1.2.3-4'],
|
||||
[' 1.2.3-pre ', '1.2.3-pre'],
|
||||
[' =v1.2.3 ', '1.2.3'],
|
||||
['v1.2.3', '1.2.3'],
|
||||
[' v1.2.3 ', '1.2.3'],
|
||||
['\t1.2.3', '1.2.3'],
|
||||
['>1.2.3', null],
|
||||
['~1.2.3', null],
|
||||
['<=1.2.3', null],
|
||||
['1.2.x', null]
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var msg = 'clean(' + range + ') = ' + version;
|
||||
t.equal(clean(range), version, msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
173
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/gtr.js
generated
vendored
Normal file
173
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/gtr.js
generated
vendored
Normal file
@ -0,0 +1,173 @@
|
||||
var tap = require('tap');
|
||||
var test = tap.test;
|
||||
var semver = require('../semver.js');
|
||||
var gtr = semver.gtr;
|
||||
|
||||
test('\ngtr tests', function(t) {
|
||||
// [range, version, loose]
|
||||
// Version should be greater than range
|
||||
[
|
||||
['~1.2.2', '1.3.0'],
|
||||
['~0.6.1-1', '0.7.1-1'],
|
||||
['1.0.0 - 2.0.0', '2.0.1'],
|
||||
['1.0.0', '1.0.1-beta1'],
|
||||
['1.0.0', '2.0.0'],
|
||||
['<=2.0.0', '2.1.1'],
|
||||
['<=2.0.0', '3.2.9'],
|
||||
['<2.0.0', '2.0.0'],
|
||||
['0.1.20 || 1.2.4', '1.2.5'],
|
||||
['2.x.x', '3.0.0'],
|
||||
['1.2.x', '1.3.0'],
|
||||
['1.2.x || 2.x', '3.0.0'],
|
||||
['2.*.*', '5.0.1'],
|
||||
['1.2.*', '1.3.3'],
|
||||
['1.2.* || 2.*', '4.0.0'],
|
||||
['2', '3.0.0'],
|
||||
['2.3', '2.4.2'],
|
||||
['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
|
||||
['~2.4', '2.5.5'],
|
||||
['~>3.2.1', '3.3.0'], // >=3.2.1 <3.3.0
|
||||
['~1', '2.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '2.2.4'],
|
||||
['~> 1', '3.2.3'],
|
||||
['~1.0', '1.1.2'], // >=1.0.0 <1.1.0
|
||||
['~ 1.0', '1.1.0'],
|
||||
['<1.2', '1.2.0'],
|
||||
['< 1.2', '1.2.1'],
|
||||
['1', '2.0.0beta', true],
|
||||
['~v0.5.4-pre', '0.6.0'],
|
||||
['~v0.5.4-pre', '0.6.1-pre'],
|
||||
['=0.7.x', '0.8.0'],
|
||||
['=0.7.x', '0.8.0-asdf'],
|
||||
['<0.7.x', '0.7.0'],
|
||||
['~1.2.2', '1.3.0'],
|
||||
['1.0.0 - 2.0.0', '2.2.3'],
|
||||
['1.0.0', '1.0.1'],
|
||||
['<=2.0.0', '3.0.0'],
|
||||
['<=2.0.0', '2.9999.9999'],
|
||||
['<=2.0.0', '2.2.9'],
|
||||
['<2.0.0', '2.9999.9999'],
|
||||
['<2.0.0', '2.2.9'],
|
||||
['2.x.x', '3.1.3'],
|
||||
['1.2.x', '1.3.3'],
|
||||
['1.2.x || 2.x', '3.1.3'],
|
||||
['2.*.*', '3.1.3'],
|
||||
['1.2.*', '1.3.3'],
|
||||
['1.2.* || 2.*', '3.1.3'],
|
||||
['2', '3.1.2'],
|
||||
['2.3', '2.4.1'],
|
||||
['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
|
||||
['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
|
||||
['~1', '2.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '2.2.3'],
|
||||
['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
|
||||
['<1', '1.0.0'],
|
||||
['1', '2.0.0beta', true],
|
||||
['<1', '1.0.0beta', true],
|
||||
['< 1', '1.0.0beta', true],
|
||||
['=0.7.x', '0.8.2'],
|
||||
['<0.7.x', '0.7.2']
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var loose = tuple[2] || false;
|
||||
var msg = 'gtr(' + version + ', ' + range + ', ' + loose + ')';
|
||||
t.ok(gtr(version, range, loose), msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nnegative gtr tests', function(t) {
|
||||
// [range, version, loose]
|
||||
// Version should NOT be greater than range
|
||||
[
|
||||
['~0.6.1-1', '0.6.1-1'],
|
||||
['1.0.0 - 2.0.0', '1.2.3'],
|
||||
['1.0.0 - 2.0.0', '0.9.9'],
|
||||
['1.0.0', '1.0.0'],
|
||||
['>=*', '0.2.4'],
|
||||
['', '1.0.0', true],
|
||||
['*', '1.2.3'],
|
||||
['*', 'v1.2.3-foo'],
|
||||
['>=1.0.0', '1.0.0'],
|
||||
['>=1.0.0', '1.0.1'],
|
||||
['>=1.0.0', '1.1.0'],
|
||||
['>1.0.0', '1.0.1'],
|
||||
['>1.0.0', '1.1.0'],
|
||||
['<=2.0.0', '2.0.0'],
|
||||
['<=2.0.0', '1.9999.9999'],
|
||||
['<=2.0.0', '0.2.9'],
|
||||
['<2.0.0', '1.9999.9999'],
|
||||
['<2.0.0', '0.2.9'],
|
||||
['>= 1.0.0', '1.0.0'],
|
||||
['>= 1.0.0', '1.0.1'],
|
||||
['>= 1.0.0', '1.1.0'],
|
||||
['> 1.0.0', '1.0.1'],
|
||||
['> 1.0.0', '1.1.0'],
|
||||
['<= 2.0.0', '2.0.0'],
|
||||
['<= 2.0.0', '1.9999.9999'],
|
||||
['<= 2.0.0', '0.2.9'],
|
||||
['< 2.0.0', '1.9999.9999'],
|
||||
['<\t2.0.0', '0.2.9'],
|
||||
['>=0.1.97', 'v0.1.97'],
|
||||
['>=0.1.97', '0.1.97'],
|
||||
['0.1.20 || 1.2.4', '1.2.4'],
|
||||
['0.1.20 || >1.2.4', '1.2.4'],
|
||||
['0.1.20 || 1.2.4', '1.2.3'],
|
||||
['0.1.20 || 1.2.4', '0.1.20'],
|
||||
['>=0.2.3 || <0.0.1', '0.0.0'],
|
||||
['>=0.2.3 || <0.0.1', '0.2.3'],
|
||||
['>=0.2.3 || <0.0.1', '0.2.4'],
|
||||
['||', '1.3.4'],
|
||||
['2.x.x', '2.1.3'],
|
||||
['1.2.x', '1.2.3'],
|
||||
['1.2.x || 2.x', '2.1.3'],
|
||||
['1.2.x || 2.x', '1.2.3'],
|
||||
['x', '1.2.3'],
|
||||
['2.*.*', '2.1.3'],
|
||||
['1.2.*', '1.2.3'],
|
||||
['1.2.* || 2.*', '2.1.3'],
|
||||
['1.2.* || 2.*', '1.2.3'],
|
||||
['1.2.* || 2.*', '1.2.3'],
|
||||
['*', '1.2.3'],
|
||||
['2', '2.1.2'],
|
||||
['2.3', '2.3.1'],
|
||||
['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
|
||||
['~2.4', '2.4.5'],
|
||||
['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
|
||||
['~1', '1.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '1.2.3'],
|
||||
['~> 1', '1.2.3'],
|
||||
['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
|
||||
['~ 1.0', '1.0.2'],
|
||||
['>=1', '1.0.0'],
|
||||
['>= 1', '1.0.0'],
|
||||
['<1.2', '1.1.1'],
|
||||
['< 1.2', '1.1.1'],
|
||||
['1', '1.0.0beta', true],
|
||||
['~v0.5.4-pre', '0.5.5'],
|
||||
['~v0.5.4-pre', '0.5.4'],
|
||||
['=0.7.x', '0.7.2'],
|
||||
['>=0.7.x', '0.7.2'],
|
||||
['=0.7.x', '0.7.0-asdf'],
|
||||
['>=0.7.x', '0.7.0-asdf'],
|
||||
['<=0.7.x', '0.6.2'],
|
||||
['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
|
||||
['>=0.2.3 <=0.2.4', '0.2.4'],
|
||||
['1.0.0 - 2.0.0', '2.0.0'],
|
||||
['^1', '0.0.0-0'],
|
||||
['^3.0.0', '2.0.0'],
|
||||
['^1.0.0 || ~2.0.1', '2.0.0'],
|
||||
['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
|
||||
['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
|
||||
['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
|
||||
['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0']
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var loose = tuple[2] || false;
|
||||
var msg = '!gtr(' + version + ', ' + range + ', ' + loose + ')';
|
||||
t.notOk(gtr(version, range, loose), msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
685
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/index.js
generated
vendored
Normal file
685
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/index.js
generated
vendored
Normal file
@ -0,0 +1,685 @@
|
||||
'use strict';
|
||||
|
||||
var tap = require('tap');
|
||||
var test = tap.test;
|
||||
var semver = require('../semver.js');
|
||||
var eq = semver.eq;
|
||||
var gt = semver.gt;
|
||||
var lt = semver.lt;
|
||||
var neq = semver.neq;
|
||||
var cmp = semver.cmp;
|
||||
var gte = semver.gte;
|
||||
var lte = semver.lte;
|
||||
var satisfies = semver.satisfies;
|
||||
var validRange = semver.validRange;
|
||||
var inc = semver.inc;
|
||||
var diff = semver.diff;
|
||||
var replaceStars = semver.replaceStars;
|
||||
var toComparators = semver.toComparators;
|
||||
var SemVer = semver.SemVer;
|
||||
var Range = semver.Range;
|
||||
|
||||
test('\ncomparison tests', function(t) {
|
||||
// [version1, version2]
|
||||
// version1 should be greater than version2
|
||||
[['0.0.0', '0.0.0-foo'],
|
||||
['0.0.1', '0.0.0'],
|
||||
['1.0.0', '0.9.9'],
|
||||
['0.10.0', '0.9.0'],
|
||||
['0.99.0', '0.10.0'],
|
||||
['2.0.0', '1.2.3'],
|
||||
['v0.0.0', '0.0.0-foo', true],
|
||||
['v0.0.1', '0.0.0', true],
|
||||
['v1.0.0', '0.9.9', true],
|
||||
['v0.10.0', '0.9.0', true],
|
||||
['v0.99.0', '0.10.0', true],
|
||||
['v2.0.0', '1.2.3', true],
|
||||
['0.0.0', 'v0.0.0-foo', true],
|
||||
['0.0.1', 'v0.0.0', true],
|
||||
['1.0.0', 'v0.9.9', true],
|
||||
['0.10.0', 'v0.9.0', true],
|
||||
['0.99.0', 'v0.10.0', true],
|
||||
['2.0.0', 'v1.2.3', true],
|
||||
['1.2.3', '1.2.3-asdf'],
|
||||
['1.2.3', '1.2.3-4'],
|
||||
['1.2.3', '1.2.3-4-foo'],
|
||||
['1.2.3-5-foo', '1.2.3-5'],
|
||||
['1.2.3-5', '1.2.3-4'],
|
||||
['1.2.3-5-foo', '1.2.3-5-Foo'],
|
||||
['3.0.0', '2.7.2+asdf'],
|
||||
['1.2.3-a.10', '1.2.3-a.5'],
|
||||
['1.2.3-a.b', '1.2.3-a.5'],
|
||||
['1.2.3-a.b', '1.2.3-a'],
|
||||
['1.2.3-a.b.c.10.d.5', '1.2.3-a.b.c.5.d.100'],
|
||||
['1.2.3-r2', '1.2.3-r100'],
|
||||
['1.2.3-r100', '1.2.3-R2']
|
||||
].forEach(function(v) {
|
||||
var v0 = v[0];
|
||||
var v1 = v[1];
|
||||
var loose = v[2];
|
||||
t.ok(gt(v0, v1, loose), "gt('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(lt(v1, v0, loose), "lt('" + v1 + "', '" + v0 + "')");
|
||||
t.ok(!gt(v1, v0, loose), "!gt('" + v1 + "', '" + v0 + "')");
|
||||
t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(eq(v0, v0, loose), "eq('" + v0 + "', '" + v0 + "')");
|
||||
t.ok(eq(v1, v1, loose), "eq('" + v1 + "', '" + v1 + "')");
|
||||
t.ok(neq(v0, v1, loose), "neq('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(cmp(v1, '==', v1, loose), "cmp('" + v1 + "' == '" + v1 + "')");
|
||||
t.ok(cmp(v0, '>=', v1, loose), "cmp('" + v0 + "' >= '" + v1 + "')");
|
||||
t.ok(cmp(v1, '<=', v0, loose), "cmp('" + v1 + "' <= '" + v0 + "')");
|
||||
t.ok(cmp(v0, '!=', v1, loose), "cmp('" + v0 + "' != '" + v1 + "')");
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nequality tests', function(t) {
|
||||
// [version1, version2]
|
||||
// version1 should be equivalent to version2
|
||||
[['1.2.3', 'v1.2.3', true],
|
||||
['1.2.3', '=1.2.3', true],
|
||||
['1.2.3', 'v 1.2.3', true],
|
||||
['1.2.3', '= 1.2.3', true],
|
||||
['1.2.3', ' v1.2.3', true],
|
||||
['1.2.3', ' =1.2.3', true],
|
||||
['1.2.3', ' v 1.2.3', true],
|
||||
['1.2.3', ' = 1.2.3', true],
|
||||
['1.2.3-0', 'v1.2.3-0', true],
|
||||
['1.2.3-0', '=1.2.3-0', true],
|
||||
['1.2.3-0', 'v 1.2.3-0', true],
|
||||
['1.2.3-0', '= 1.2.3-0', true],
|
||||
['1.2.3-0', ' v1.2.3-0', true],
|
||||
['1.2.3-0', ' =1.2.3-0', true],
|
||||
['1.2.3-0', ' v 1.2.3-0', true],
|
||||
['1.2.3-0', ' = 1.2.3-0', true],
|
||||
['1.2.3-1', 'v1.2.3-1', true],
|
||||
['1.2.3-1', '=1.2.3-1', true],
|
||||
['1.2.3-1', 'v 1.2.3-1', true],
|
||||
['1.2.3-1', '= 1.2.3-1', true],
|
||||
['1.2.3-1', ' v1.2.3-1', true],
|
||||
['1.2.3-1', ' =1.2.3-1', true],
|
||||
['1.2.3-1', ' v 1.2.3-1', true],
|
||||
['1.2.3-1', ' = 1.2.3-1', true],
|
||||
['1.2.3-beta', 'v1.2.3-beta', true],
|
||||
['1.2.3-beta', '=1.2.3-beta', true],
|
||||
['1.2.3-beta', 'v 1.2.3-beta', true],
|
||||
['1.2.3-beta', '= 1.2.3-beta', true],
|
||||
['1.2.3-beta', ' v1.2.3-beta', true],
|
||||
['1.2.3-beta', ' =1.2.3-beta', true],
|
||||
['1.2.3-beta', ' v 1.2.3-beta', true],
|
||||
['1.2.3-beta', ' = 1.2.3-beta', true],
|
||||
['1.2.3-beta+build', ' = 1.2.3-beta+otherbuild', true],
|
||||
['1.2.3+build', ' = 1.2.3+otherbuild', true],
|
||||
['1.2.3-beta+build', '1.2.3-beta+otherbuild'],
|
||||
['1.2.3+build', '1.2.3+otherbuild'],
|
||||
[' v1.2.3+build', '1.2.3+otherbuild']
|
||||
].forEach(function(v) {
|
||||
var v0 = v[0];
|
||||
var v1 = v[1];
|
||||
var loose = v[2];
|
||||
t.ok(eq(v0, v1, loose), "eq('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(!neq(v0, v1, loose), "!neq('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(cmp(v0, '==', v1, loose), 'cmp(' + v0 + '==' + v1 + ')');
|
||||
t.ok(!cmp(v0, '!=', v1, loose), '!cmp(' + v0 + '!=' + v1 + ')');
|
||||
t.ok(!cmp(v0, '===', v1, loose), '!cmp(' + v0 + '===' + v1 + ')');
|
||||
t.ok(cmp(v0, '!==', v1, loose), 'cmp(' + v0 + '!==' + v1 + ')');
|
||||
t.ok(!gt(v0, v1, loose), "!gt('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(gte(v0, v1, loose), "gte('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(!lt(v0, v1, loose), "!lt('" + v0 + "', '" + v1 + "')");
|
||||
t.ok(lte(v0, v1, loose), "lte('" + v0 + "', '" + v1 + "')");
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
||||
test('\nrange tests', function(t) {
|
||||
// [range, version]
|
||||
// version should be included by range
|
||||
[['1.0.0 - 2.0.0', '1.2.3'],
|
||||
['^1.2.3+build', '1.2.3'],
|
||||
['^1.2.3+build', '1.3.0'],
|
||||
['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3'],
|
||||
['1.2.3pre+asdf - 2.4.3-pre+asdf', '1.2.3', true],
|
||||
['1.2.3-pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
|
||||
['1.2.3pre+asdf - 2.4.3pre+asdf', '1.2.3', true],
|
||||
['1.2.3-pre+asdf - 2.4.3-pre+asdf', '1.2.3-pre.2'],
|
||||
['1.2.3-pre+asdf - 2.4.3-pre+asdf', '2.4.3-alpha'],
|
||||
['1.2.3+asdf - 2.4.3+asdf', '1.2.3'],
|
||||
['1.0.0', '1.0.0'],
|
||||
['>=*', '0.2.4'],
|
||||
['', '1.0.0'],
|
||||
['*', '1.2.3'],
|
||||
['*', 'v1.2.3', true],
|
||||
['>=1.0.0', '1.0.0'],
|
||||
['>=1.0.0', '1.0.1'],
|
||||
['>=1.0.0', '1.1.0'],
|
||||
['>1.0.0', '1.0.1'],
|
||||
['>1.0.0', '1.1.0'],
|
||||
['<=2.0.0', '2.0.0'],
|
||||
['<=2.0.0', '1.9999.9999'],
|
||||
['<=2.0.0', '0.2.9'],
|
||||
['<2.0.0', '1.9999.9999'],
|
||||
['<2.0.0', '0.2.9'],
|
||||
['>= 1.0.0', '1.0.0'],
|
||||
['>= 1.0.0', '1.0.1'],
|
||||
['>= 1.0.0', '1.1.0'],
|
||||
['> 1.0.0', '1.0.1'],
|
||||
['> 1.0.0', '1.1.0'],
|
||||
['<= 2.0.0', '2.0.0'],
|
||||
['<= 2.0.0', '1.9999.9999'],
|
||||
['<= 2.0.0', '0.2.9'],
|
||||
['< 2.0.0', '1.9999.9999'],
|
||||
['<\t2.0.0', '0.2.9'],
|
||||
['>=0.1.97', 'v0.1.97', true],
|
||||
['>=0.1.97', '0.1.97'],
|
||||
['0.1.20 || 1.2.4', '1.2.4'],
|
||||
['>=0.2.3 || <0.0.1', '0.0.0'],
|
||||
['>=0.2.3 || <0.0.1', '0.2.3'],
|
||||
['>=0.2.3 || <0.0.1', '0.2.4'],
|
||||
['||', '1.3.4'],
|
||||
['2.x.x', '2.1.3'],
|
||||
['1.2.x', '1.2.3'],
|
||||
['1.2.x || 2.x', '2.1.3'],
|
||||
['1.2.x || 2.x', '1.2.3'],
|
||||
['x', '1.2.3'],
|
||||
['2.*.*', '2.1.3'],
|
||||
['1.2.*', '1.2.3'],
|
||||
['1.2.* || 2.*', '2.1.3'],
|
||||
['1.2.* || 2.*', '1.2.3'],
|
||||
['*', '1.2.3'],
|
||||
['2', '2.1.2'],
|
||||
['2.3', '2.3.1'],
|
||||
['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
|
||||
['~2.4', '2.4.5'],
|
||||
['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0,
|
||||
['~1', '1.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '1.2.3'],
|
||||
['~> 1', '1.2.3'],
|
||||
['~1.0', '1.0.2'], // >=1.0.0 <1.1.0,
|
||||
['~ 1.0', '1.0.2'],
|
||||
['~ 1.0.3', '1.0.12'],
|
||||
['>=1', '1.0.0'],
|
||||
['>= 1', '1.0.0'],
|
||||
['<1.2', '1.1.1'],
|
||||
['< 1.2', '1.1.1'],
|
||||
['~v0.5.4-pre', '0.5.5'],
|
||||
['~v0.5.4-pre', '0.5.4'],
|
||||
['=0.7.x', '0.7.2'],
|
||||
['<=0.7.x', '0.7.2'],
|
||||
['>=0.7.x', '0.7.2'],
|
||||
['<=0.7.x', '0.6.2'],
|
||||
['~1.2.1 >=1.2.3', '1.2.3'],
|
||||
['~1.2.1 =1.2.3', '1.2.3'],
|
||||
['~1.2.1 1.2.3', '1.2.3'],
|
||||
['~1.2.1 >=1.2.3 1.2.3', '1.2.3'],
|
||||
['~1.2.1 1.2.3 >=1.2.3', '1.2.3'],
|
||||
['~1.2.1 1.2.3', '1.2.3'],
|
||||
['>=1.2.1 1.2.3', '1.2.3'],
|
||||
['1.2.3 >=1.2.1', '1.2.3'],
|
||||
['>=1.2.3 >=1.2.1', '1.2.3'],
|
||||
['>=1.2.1 >=1.2.3', '1.2.3'],
|
||||
['>=1.2', '1.2.8'],
|
||||
['^1.2.3', '1.8.1'],
|
||||
['^0.1.2', '0.1.2'],
|
||||
['^0.1', '0.1.2'],
|
||||
['^1.2', '1.4.2'],
|
||||
['^1.2 ^1', '1.4.2'],
|
||||
['^1.2.3-alpha', '1.2.3-pre'],
|
||||
['^1.2.0-alpha', '1.2.0-pre'],
|
||||
['^0.0.1-alpha', '0.0.1-beta']
|
||||
].forEach(function(v) {
|
||||
var range = v[0];
|
||||
var ver = v[1];
|
||||
var loose = v[2];
|
||||
t.ok(satisfies(ver, range, loose), range + ' satisfied by ' + ver);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nnegative range tests', function(t) {
|
||||
// [range, version]
|
||||
// version should not be included by range
|
||||
[['1.0.0 - 2.0.0', '2.2.3'],
|
||||
['1.2.3+asdf - 2.4.3+asdf', '1.2.3-pre.2'],
|
||||
['1.2.3+asdf - 2.4.3+asdf', '2.4.3-alpha'],
|
||||
['^1.2.3+build', '2.0.0'],
|
||||
['^1.2.3+build', '1.2.0'],
|
||||
['^1.2.3', '1.2.3-pre'],
|
||||
['^1.2', '1.2.0-pre'],
|
||||
['>1.2', '1.3.0-beta'],
|
||||
['<=1.2.3', '1.2.3-beta'],
|
||||
['^1.2.3', '1.2.3-beta'],
|
||||
['=0.7.x', '0.7.0-asdf'],
|
||||
['>=0.7.x', '0.7.0-asdf'],
|
||||
['1', '1.0.0beta', true],
|
||||
['<1', '1.0.0beta', true],
|
||||
['< 1', '1.0.0beta', true],
|
||||
['1.0.0', '1.0.1'],
|
||||
['>=1.0.0', '0.0.0'],
|
||||
['>=1.0.0', '0.0.1'],
|
||||
['>=1.0.0', '0.1.0'],
|
||||
['>1.0.0', '0.0.1'],
|
||||
['>1.0.0', '0.1.0'],
|
||||
['<=2.0.0', '3.0.0'],
|
||||
['<=2.0.0', '2.9999.9999'],
|
||||
['<=2.0.0', '2.2.9'],
|
||||
['<2.0.0', '2.9999.9999'],
|
||||
['<2.0.0', '2.2.9'],
|
||||
['>=0.1.97', 'v0.1.93', true],
|
||||
['>=0.1.97', '0.1.93'],
|
||||
['0.1.20 || 1.2.4', '1.2.3'],
|
||||
['>=0.2.3 || <0.0.1', '0.0.3'],
|
||||
['>=0.2.3 || <0.0.1', '0.2.2'],
|
||||
['2.x.x', '1.1.3'],
|
||||
['2.x.x', '3.1.3'],
|
||||
['1.2.x', '1.3.3'],
|
||||
['1.2.x || 2.x', '3.1.3'],
|
||||
['1.2.x || 2.x', '1.1.3'],
|
||||
['2.*.*', '1.1.3'],
|
||||
['2.*.*', '3.1.3'],
|
||||
['1.2.*', '1.3.3'],
|
||||
['1.2.* || 2.*', '3.1.3'],
|
||||
['1.2.* || 2.*', '1.1.3'],
|
||||
['2', '1.1.2'],
|
||||
['2.3', '2.4.1'],
|
||||
['~2.4', '2.5.0'], // >=2.4.0 <2.5.0
|
||||
['~2.4', '2.3.9'],
|
||||
['~>3.2.1', '3.3.2'], // >=3.2.1 <3.3.0
|
||||
['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
|
||||
['~1', '0.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '2.2.3'],
|
||||
['~1.0', '1.1.0'], // >=1.0.0 <1.1.0
|
||||
['<1', '1.0.0'],
|
||||
['>=1.2', '1.1.1'],
|
||||
['1', '2.0.0beta', true],
|
||||
['~v0.5.4-beta', '0.5.4-alpha'],
|
||||
['=0.7.x', '0.8.2'],
|
||||
['>=0.7.x', '0.6.2'],
|
||||
['<0.7.x', '0.7.2'],
|
||||
['<1.2.3', '1.2.3-beta'],
|
||||
['=1.2.3', '1.2.3-beta'],
|
||||
['>1.2', '1.2.8'],
|
||||
['^1.2.3', '2.0.0-alpha'],
|
||||
['^1.2.3', '1.2.2'],
|
||||
['^1.2', '1.1.9'],
|
||||
['*', 'v1.2.3-foo', true],
|
||||
// invalid ranges never satisfied!
|
||||
['blerg', '1.2.3'],
|
||||
['git+https://user:password0123@github.com/foo', '123.0.0', true],
|
||||
['^1.2.3', '2.0.0-pre']
|
||||
].forEach(function(v) {
|
||||
var range = v[0];
|
||||
var ver = v[1];
|
||||
var loose = v[2];
|
||||
var found = satisfies(ver, range, loose);
|
||||
t.ok(!found, ver + ' not satisfied by ' + range);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nincrement versions test', function(t) {
|
||||
// [version, inc, result, identifier]
|
||||
// inc(version, inc) -> result
|
||||
[['1.2.3', 'major', '2.0.0'],
|
||||
['1.2.3', 'minor', '1.3.0'],
|
||||
['1.2.3', 'patch', '1.2.4'],
|
||||
['1.2.3tag', 'major', '2.0.0', true],
|
||||
['1.2.3-tag', 'major', '2.0.0'],
|
||||
['1.2.3', 'fake', null],
|
||||
['1.2.0-0', 'patch', '1.2.0'],
|
||||
['fake', 'major', null],
|
||||
['1.2.3-4', 'major', '2.0.0'],
|
||||
['1.2.3-4', 'minor', '1.3.0'],
|
||||
['1.2.3-4', 'patch', '1.2.3'],
|
||||
['1.2.3-alpha.0.beta', 'major', '2.0.0'],
|
||||
['1.2.3-alpha.0.beta', 'minor', '1.3.0'],
|
||||
['1.2.3-alpha.0.beta', 'patch', '1.2.3'],
|
||||
['1.2.4', 'prerelease', '1.2.5-0'],
|
||||
['1.2.3-0', 'prerelease', '1.2.3-1'],
|
||||
['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1'],
|
||||
['1.2.3-alpha.1', 'prerelease', '1.2.3-alpha.2'],
|
||||
['1.2.3-alpha.2', 'prerelease', '1.2.3-alpha.3'],
|
||||
['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta'],
|
||||
['1.2.3-alpha.1.beta', 'prerelease', '1.2.3-alpha.2.beta'],
|
||||
['1.2.3-alpha.2.beta', 'prerelease', '1.2.3-alpha.3.beta'],
|
||||
['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta'],
|
||||
['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta'],
|
||||
['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta'],
|
||||
['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1'],
|
||||
['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2'],
|
||||
['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3'],
|
||||
['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta'],
|
||||
['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta'],
|
||||
['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta'],
|
||||
['1.2.0', 'prepatch', '1.2.1-0'],
|
||||
['1.2.0-1', 'prepatch', '1.2.1-0'],
|
||||
['1.2.0', 'preminor', '1.3.0-0'],
|
||||
['1.2.3-1', 'preminor', '1.3.0-0'],
|
||||
['1.2.0', 'premajor', '2.0.0-0'],
|
||||
['1.2.3-1', 'premajor', '2.0.0-0'],
|
||||
['1.2.0-1', 'minor', '1.2.0'],
|
||||
['1.0.0-1', 'major', '1.0.0'],
|
||||
|
||||
['1.2.3', 'major', '2.0.0', false, 'dev'],
|
||||
['1.2.3', 'minor', '1.3.0', false, 'dev'],
|
||||
['1.2.3', 'patch', '1.2.4', false, 'dev'],
|
||||
['1.2.3tag', 'major', '2.0.0', true, 'dev'],
|
||||
['1.2.3-tag', 'major', '2.0.0', false, 'dev'],
|
||||
['1.2.3', 'fake', null, false, 'dev'],
|
||||
['1.2.0-0', 'patch', '1.2.0', false, 'dev'],
|
||||
['fake', 'major', null, false, 'dev'],
|
||||
['1.2.3-4', 'major', '2.0.0', false, 'dev'],
|
||||
['1.2.3-4', 'minor', '1.3.0', false, 'dev'],
|
||||
['1.2.3-4', 'patch', '1.2.3', false, 'dev'],
|
||||
['1.2.3-alpha.0.beta', 'major', '2.0.0', false, 'dev'],
|
||||
['1.2.3-alpha.0.beta', 'minor', '1.3.0', false, 'dev'],
|
||||
['1.2.3-alpha.0.beta', 'patch', '1.2.3', false, 'dev'],
|
||||
['1.2.4', 'prerelease', '1.2.5-dev.0', false, 'dev'],
|
||||
['1.2.3-0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
|
||||
['1.2.3-alpha.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
|
||||
['1.2.3-alpha.0', 'prerelease', '1.2.3-alpha.1', false, 'alpha'],
|
||||
['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
|
||||
['1.2.3-alpha.0.beta', 'prerelease', '1.2.3-alpha.1.beta', false, 'alpha'],
|
||||
['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
|
||||
['1.2.3-alpha.10.0.beta', 'prerelease', '1.2.3-alpha.10.1.beta', false, 'alpha'],
|
||||
['1.2.3-alpha.10.1.beta', 'prerelease', '1.2.3-alpha.10.2.beta', false, 'alpha'],
|
||||
['1.2.3-alpha.10.2.beta', 'prerelease', '1.2.3-alpha.10.3.beta', false, 'alpha'],
|
||||
['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-dev.0', false, 'dev'],
|
||||
['1.2.3-alpha.10.beta.0', 'prerelease', '1.2.3-alpha.10.beta.1', false, 'alpha'],
|
||||
['1.2.3-alpha.10.beta.1', 'prerelease', '1.2.3-alpha.10.beta.2', false, 'alpha'],
|
||||
['1.2.3-alpha.10.beta.2', 'prerelease', '1.2.3-alpha.10.beta.3', false, 'alpha'],
|
||||
['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-dev.0', false, 'dev'],
|
||||
['1.2.3-alpha.9.beta', 'prerelease', '1.2.3-alpha.10.beta', false, 'alpha'],
|
||||
['1.2.3-alpha.10.beta', 'prerelease', '1.2.3-alpha.11.beta', false, 'alpha'],
|
||||
['1.2.3-alpha.11.beta', 'prerelease', '1.2.3-alpha.12.beta', false, 'alpha'],
|
||||
['1.2.0', 'prepatch', '1.2.1-dev.0', 'dev'],
|
||||
['1.2.0-1', 'prepatch', '1.2.1-dev.0', 'dev'],
|
||||
['1.2.0', 'preminor', '1.3.0-dev.0', 'dev'],
|
||||
['1.2.3-1', 'preminor', '1.3.0-dev.0', 'dev'],
|
||||
['1.2.0', 'premajor', '2.0.0-dev.0', 'dev'],
|
||||
['1.2.3-1', 'premajor', '2.0.0-dev.0', 'dev'],
|
||||
['1.2.0-1', 'minor', '1.2.0', 'dev'],
|
||||
['1.0.0-1', 'major', '1.0.0', 'dev'],
|
||||
['1.2.3-dev.bar', 'prerelease', '1.2.3-dev.0', false, 'dev']
|
||||
|
||||
].forEach(function(v) {
|
||||
var pre = v[0];
|
||||
var what = v[1];
|
||||
var wanted = v[2];
|
||||
var loose = v[3];
|
||||
var id = v[4];
|
||||
var found = inc(pre, what, loose, id);
|
||||
var cmd = 'inc(' + pre + ', ' + what + ', ' + id + ')';
|
||||
t.equal(found, wanted, cmd + ' === ' + wanted);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\ndiff versions test', function(t) {
|
||||
// [version1, version2, result]
|
||||
// diff(version1, version2) -> result
|
||||
[['1.2.3', '0.2.3', 'major'],
|
||||
['1.4.5', '0.2.3', 'major'],
|
||||
['1.2.3', '2.0.0-pre', 'premajor'],
|
||||
['1.2.3', '1.3.3', 'minor'],
|
||||
['1.0.1', '1.1.0-pre', 'preminor'],
|
||||
['1.2.3', '1.2.4', 'patch'],
|
||||
['1.2.3', '1.2.4-pre', 'prepatch'],
|
||||
['0.0.1', '0.0.1-pre', 'prerelease'],
|
||||
['0.0.1', '0.0.1-pre-2', 'prerelease'],
|
||||
['1.1.0', '1.1.0-pre', 'prerelease'],
|
||||
['1.1.0-pre-1', '1.1.0-pre-2', 'prerelease'],
|
||||
['1.0.0', '1.0.0', null]
|
||||
|
||||
].forEach(function(v) {
|
||||
var version1 = v[0];
|
||||
var version2 = v[1];
|
||||
var wanted = v[2];
|
||||
var found = diff(version1, version2);
|
||||
var cmd = 'diff(' + version1 + ', ' + version2 + ')';
|
||||
t.equal(found, wanted, cmd + ' === ' + wanted);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nvalid range test', function(t) {
|
||||
// [range, result]
|
||||
// validRange(range) -> result
|
||||
// translate ranges into their canonical form
|
||||
[['1.0.0 - 2.0.0', '>=1.0.0 <=2.0.0'],
|
||||
['1.0.0', '1.0.0'],
|
||||
['>=*', '*'],
|
||||
['', '*'],
|
||||
['*', '*'],
|
||||
['*', '*'],
|
||||
['>=1.0.0', '>=1.0.0'],
|
||||
['>1.0.0', '>1.0.0'],
|
||||
['<=2.0.0', '<=2.0.0'],
|
||||
['1', '>=1.0.0 <2.0.0'],
|
||||
['<=2.0.0', '<=2.0.0'],
|
||||
['<=2.0.0', '<=2.0.0'],
|
||||
['<2.0.0', '<2.0.0'],
|
||||
['<2.0.0', '<2.0.0'],
|
||||
['>= 1.0.0', '>=1.0.0'],
|
||||
['>= 1.0.0', '>=1.0.0'],
|
||||
['>= 1.0.0', '>=1.0.0'],
|
||||
['> 1.0.0', '>1.0.0'],
|
||||
['> 1.0.0', '>1.0.0'],
|
||||
['<= 2.0.0', '<=2.0.0'],
|
||||
['<= 2.0.0', '<=2.0.0'],
|
||||
['<= 2.0.0', '<=2.0.0'],
|
||||
['< 2.0.0', '<2.0.0'],
|
||||
['< 2.0.0', '<2.0.0'],
|
||||
['>=0.1.97', '>=0.1.97'],
|
||||
['>=0.1.97', '>=0.1.97'],
|
||||
['0.1.20 || 1.2.4', '0.1.20||1.2.4'],
|
||||
['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
|
||||
['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
|
||||
['>=0.2.3 || <0.0.1', '>=0.2.3||<0.0.1'],
|
||||
['||', '||'],
|
||||
['2.x.x', '>=2.0.0 <3.0.0'],
|
||||
['1.2.x', '>=1.2.0 <1.3.0'],
|
||||
['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
|
||||
['1.2.x || 2.x', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
|
||||
['x', '*'],
|
||||
['2.*.*', '>=2.0.0 <3.0.0'],
|
||||
['1.2.*', '>=1.2.0 <1.3.0'],
|
||||
['1.2.* || 2.*', '>=1.2.0 <1.3.0||>=2.0.0 <3.0.0'],
|
||||
['*', '*'],
|
||||
['2', '>=2.0.0 <3.0.0'],
|
||||
['2.3', '>=2.3.0 <2.4.0'],
|
||||
['~2.4', '>=2.4.0 <2.5.0'],
|
||||
['~2.4', '>=2.4.0 <2.5.0'],
|
||||
['~>3.2.1', '>=3.2.1 <3.3.0'],
|
||||
['~1', '>=1.0.0 <2.0.0'],
|
||||
['~>1', '>=1.0.0 <2.0.0'],
|
||||
['~> 1', '>=1.0.0 <2.0.0'],
|
||||
['~1.0', '>=1.0.0 <1.1.0'],
|
||||
['~ 1.0', '>=1.0.0 <1.1.0'],
|
||||
['^0', '>=0.0.0 <1.0.0'],
|
||||
['^ 1', '>=1.0.0 <2.0.0'],
|
||||
['^0.1', '>=0.1.0 <0.2.0'],
|
||||
['^1.0', '>=1.0.0 <2.0.0'],
|
||||
['^1.2', '>=1.2.0 <2.0.0'],
|
||||
['^0.0.1', '>=0.0.1 <0.0.2'],
|
||||
['^0.0.1-beta', '>=0.0.1-beta <0.0.2'],
|
||||
['^0.1.2', '>=0.1.2 <0.2.0'],
|
||||
['^1.2.3', '>=1.2.3 <2.0.0'],
|
||||
['^1.2.3-beta.4', '>=1.2.3-beta.4 <2.0.0'],
|
||||
['<1', '<1.0.0'],
|
||||
['< 1', '<1.0.0'],
|
||||
['>=1', '>=1.0.0'],
|
||||
['>= 1', '>=1.0.0'],
|
||||
['<1.2', '<1.2.0'],
|
||||
['< 1.2', '<1.2.0'],
|
||||
['1', '>=1.0.0 <2.0.0'],
|
||||
['>01.02.03', '>1.2.3', true],
|
||||
['>01.02.03', null],
|
||||
['~1.2.3beta', '>=1.2.3-beta <1.3.0', true],
|
||||
['~1.2.3beta', null],
|
||||
['^ 1.2 ^ 1', '>=1.2.0 <2.0.0 >=1.0.0 <2.0.0']
|
||||
].forEach(function(v) {
|
||||
var pre = v[0];
|
||||
var wanted = v[1];
|
||||
var loose = v[2];
|
||||
var found = validRange(pre, loose);
|
||||
|
||||
t.equal(found, wanted, 'validRange(' + pre + ') === ' + wanted);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\ncomparators test', function(t) {
|
||||
// [range, comparators]
|
||||
// turn range into a set of individual comparators
|
||||
[['1.0.0 - 2.0.0', [['>=1.0.0', '<=2.0.0']]],
|
||||
['1.0.0', [['1.0.0']]],
|
||||
['>=*', [['']]],
|
||||
['', [['']]],
|
||||
['*', [['']]],
|
||||
['*', [['']]],
|
||||
['>=1.0.0', [['>=1.0.0']]],
|
||||
['>=1.0.0', [['>=1.0.0']]],
|
||||
['>=1.0.0', [['>=1.0.0']]],
|
||||
['>1.0.0', [['>1.0.0']]],
|
||||
['>1.0.0', [['>1.0.0']]],
|
||||
['<=2.0.0', [['<=2.0.0']]],
|
||||
['1', [['>=1.0.0', '<2.0.0']]],
|
||||
['<=2.0.0', [['<=2.0.0']]],
|
||||
['<=2.0.0', [['<=2.0.0']]],
|
||||
['<2.0.0', [['<2.0.0']]],
|
||||
['<2.0.0', [['<2.0.0']]],
|
||||
['>= 1.0.0', [['>=1.0.0']]],
|
||||
['>= 1.0.0', [['>=1.0.0']]],
|
||||
['>= 1.0.0', [['>=1.0.0']]],
|
||||
['> 1.0.0', [['>1.0.0']]],
|
||||
['> 1.0.0', [['>1.0.0']]],
|
||||
['<= 2.0.0', [['<=2.0.0']]],
|
||||
['<= 2.0.0', [['<=2.0.0']]],
|
||||
['<= 2.0.0', [['<=2.0.0']]],
|
||||
['< 2.0.0', [['<2.0.0']]],
|
||||
['<\t2.0.0', [['<2.0.0']]],
|
||||
['>=0.1.97', [['>=0.1.97']]],
|
||||
['>=0.1.97', [['>=0.1.97']]],
|
||||
['0.1.20 || 1.2.4', [['0.1.20'], ['1.2.4']]],
|
||||
['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
|
||||
['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
|
||||
['>=0.2.3 || <0.0.1', [['>=0.2.3'], ['<0.0.1']]],
|
||||
['||', [[''], ['']]],
|
||||
['2.x.x', [['>=2.0.0', '<3.0.0']]],
|
||||
['1.2.x', [['>=1.2.0', '<1.3.0']]],
|
||||
['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
|
||||
['1.2.x || 2.x', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
|
||||
['x', [['']]],
|
||||
['2.*.*', [['>=2.0.0', '<3.0.0']]],
|
||||
['1.2.*', [['>=1.2.0', '<1.3.0']]],
|
||||
['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
|
||||
['1.2.* || 2.*', [['>=1.2.0', '<1.3.0'], ['>=2.0.0', '<3.0.0']]],
|
||||
['*', [['']]],
|
||||
['2', [['>=2.0.0', '<3.0.0']]],
|
||||
['2.3', [['>=2.3.0', '<2.4.0']]],
|
||||
['~2.4', [['>=2.4.0', '<2.5.0']]],
|
||||
['~2.4', [['>=2.4.0', '<2.5.0']]],
|
||||
['~>3.2.1', [['>=3.2.1', '<3.3.0']]],
|
||||
['~1', [['>=1.0.0', '<2.0.0']]],
|
||||
['~>1', [['>=1.0.0', '<2.0.0']]],
|
||||
['~> 1', [['>=1.0.0', '<2.0.0']]],
|
||||
['~1.0', [['>=1.0.0', '<1.1.0']]],
|
||||
['~ 1.0', [['>=1.0.0', '<1.1.0']]],
|
||||
['~ 1.0.3', [['>=1.0.3', '<1.1.0']]],
|
||||
['~> 1.0.3', [['>=1.0.3', '<1.1.0']]],
|
||||
['<1', [['<1.0.0']]],
|
||||
['< 1', [['<1.0.0']]],
|
||||
['>=1', [['>=1.0.0']]],
|
||||
['>= 1', [['>=1.0.0']]],
|
||||
['<1.2', [['<1.2.0']]],
|
||||
['< 1.2', [['<1.2.0']]],
|
||||
['1', [['>=1.0.0', '<2.0.0']]],
|
||||
['1 2', [['>=1.0.0', '<2.0.0', '>=2.0.0', '<3.0.0']]],
|
||||
['1.2 - 3.4.5', [['>=1.2.0', '<=3.4.5']]],
|
||||
['1.2.3 - 3.4', [['>=1.2.3', '<3.5.0']]],
|
||||
['1.2.3 - 3', [['>=1.2.3', '<4.0.0']]],
|
||||
['>*', [['<0.0.0']]],
|
||||
['<*', [['<0.0.0']]]
|
||||
].forEach(function(v) {
|
||||
var pre = v[0];
|
||||
var wanted = v[1];
|
||||
var found = toComparators(v[0]);
|
||||
var jw = JSON.stringify(wanted);
|
||||
t.equivalent(found, wanted, 'toComparators(' + pre + ') === ' + jw);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\ninvalid version numbers', function(t) {
|
||||
['1.2.3.4',
|
||||
'NOT VALID',
|
||||
1.2,
|
||||
null,
|
||||
'Infinity.NaN.Infinity'
|
||||
].forEach(function(v) {
|
||||
t.throws(function() {
|
||||
new SemVer(v);
|
||||
}, {name:'TypeError', message:'Invalid Version: ' + v});
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nstrict vs loose version numbers', function(t) {
|
||||
[['=1.2.3', '1.2.3'],
|
||||
['01.02.03', '1.2.3'],
|
||||
['1.2.3-beta.01', '1.2.3-beta.1'],
|
||||
[' =1.2.3', '1.2.3'],
|
||||
['1.2.3foo', '1.2.3-foo']
|
||||
].forEach(function(v) {
|
||||
var loose = v[0];
|
||||
var strict = v[1];
|
||||
t.throws(function() {
|
||||
new SemVer(loose);
|
||||
});
|
||||
var lv = new SemVer(loose, true);
|
||||
t.equal(lv.version, strict);
|
||||
t.ok(eq(loose, strict, true));
|
||||
t.throws(function() {
|
||||
eq(loose, strict);
|
||||
});
|
||||
t.throws(function() {
|
||||
new SemVer(strict).compare(loose);
|
||||
});
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nstrict vs loose ranges', function(t) {
|
||||
[['>=01.02.03', '>=1.2.3'],
|
||||
['~1.02.03beta', '>=1.2.3-beta <1.3.0']
|
||||
].forEach(function(v) {
|
||||
var loose = v[0];
|
||||
var comps = v[1];
|
||||
t.throws(function() {
|
||||
new Range(loose);
|
||||
});
|
||||
t.equal(new Range(loose, true).range, comps);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nmax satisfying', function(t) {
|
||||
[[['1.2.3', '1.2.4'], '1.2', '1.2.4'],
|
||||
[['1.2.4', '1.2.3'], '1.2', '1.2.4'],
|
||||
[['1.2.3', '1.2.4', '1.2.5', '1.2.6'], '~1.2.3', '1.2.6'],
|
||||
[['1.1.0', '1.2.0', '1.2.1', '1.3.0', '2.0.0b1', '2.0.0b2', '2.0.0b3', '2.0.0', '2.1.0'], '~2.0.0', '2.0.0', true]
|
||||
].forEach(function(v) {
|
||||
var versions = v[0];
|
||||
var range = v[1];
|
||||
var expect = v[2];
|
||||
var loose = v[3];
|
||||
var actual = semver.maxSatisfying(versions, range, loose);
|
||||
t.equal(actual, expect);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
181
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/ltr.js
generated
vendored
Normal file
181
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/ltr.js
generated
vendored
Normal file
@ -0,0 +1,181 @@
|
||||
var tap = require('tap');
|
||||
var test = tap.test;
|
||||
var semver = require('../semver.js');
|
||||
var ltr = semver.ltr;
|
||||
|
||||
test('\nltr tests', function(t) {
|
||||
// [range, version, loose]
|
||||
// Version should be less than range
|
||||
[
|
||||
['~1.2.2', '1.2.1'],
|
||||
['~0.6.1-1', '0.6.1-0'],
|
||||
['1.0.0 - 2.0.0', '0.0.1'],
|
||||
['1.0.0-beta.2', '1.0.0-beta.1'],
|
||||
['1.0.0', '0.0.0'],
|
||||
['>=2.0.0', '1.1.1'],
|
||||
['>=2.0.0', '1.2.9'],
|
||||
['>2.0.0', '2.0.0'],
|
||||
['0.1.20 || 1.2.4', '0.1.5'],
|
||||
['2.x.x', '1.0.0'],
|
||||
['1.2.x', '1.1.0'],
|
||||
['1.2.x || 2.x', '1.0.0'],
|
||||
['2.*.*', '1.0.1'],
|
||||
['1.2.*', '1.1.3'],
|
||||
['1.2.* || 2.*', '1.1.9999'],
|
||||
['2', '1.0.0'],
|
||||
['2.3', '2.2.2'],
|
||||
['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
|
||||
['~2.4', '2.3.5'],
|
||||
['~>3.2.1', '3.2.0'], // >=3.2.1 <3.3.0
|
||||
['~1', '0.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '0.2.4'],
|
||||
['~> 1', '0.2.3'],
|
||||
['~1.0', '0.1.2'], // >=1.0.0 <1.1.0
|
||||
['~ 1.0', '0.1.0'],
|
||||
['>1.2', '1.2.0'],
|
||||
['> 1.2', '1.2.1'],
|
||||
['1', '0.0.0beta', true],
|
||||
['~v0.5.4-pre', '0.5.4-alpha'],
|
||||
['~v0.5.4-pre', '0.5.4-alpha'],
|
||||
['=0.7.x', '0.6.0'],
|
||||
['=0.7.x', '0.6.0-asdf'],
|
||||
['>=0.7.x', '0.6.0'],
|
||||
['~1.2.2', '1.2.1'],
|
||||
['1.0.0 - 2.0.0', '0.2.3'],
|
||||
['1.0.0', '0.0.1'],
|
||||
['>=2.0.0', '1.0.0'],
|
||||
['>=2.0.0', '1.9999.9999'],
|
||||
['>=2.0.0', '1.2.9'],
|
||||
['>2.0.0', '2.0.0'],
|
||||
['>2.0.0', '1.2.9'],
|
||||
['2.x.x', '1.1.3'],
|
||||
['1.2.x', '1.1.3'],
|
||||
['1.2.x || 2.x', '1.1.3'],
|
||||
['2.*.*', '1.1.3'],
|
||||
['1.2.*', '1.1.3'],
|
||||
['1.2.* || 2.*', '1.1.3'],
|
||||
['2', '1.9999.9999'],
|
||||
['2.3', '2.2.1'],
|
||||
['~2.4', '2.3.0'], // >=2.4.0 <2.5.0
|
||||
['~>3.2.1', '2.3.2'], // >=3.2.1 <3.3.0
|
||||
['~1', '0.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '0.2.3'],
|
||||
['~1.0', '0.0.0'], // >=1.0.0 <1.1.0
|
||||
['>1', '1.0.0'],
|
||||
['2', '1.0.0beta', true],
|
||||
['>1', '1.0.0beta', true],
|
||||
['> 1', '1.0.0beta', true],
|
||||
['=0.7.x', '0.6.2'],
|
||||
['=0.7.x', '0.7.0-asdf'],
|
||||
['^1', '1.0.0-0'],
|
||||
['>=0.7.x', '0.7.0-asdf'],
|
||||
['1', '1.0.0beta', true],
|
||||
['>=0.7.x', '0.6.2'],
|
||||
['>1.2.3', '1.3.0-alpha']
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var loose = tuple[2] || false;
|
||||
var msg = 'ltr(' + version + ', ' + range + ', ' + loose + ')';
|
||||
t.ok(ltr(version, range, loose), msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nnegative ltr tests', function(t) {
|
||||
// [range, version, loose]
|
||||
// Version should NOT be less than range
|
||||
[
|
||||
['~ 1.0', '1.1.0'],
|
||||
['~0.6.1-1', '0.6.1-1'],
|
||||
['1.0.0 - 2.0.0', '1.2.3'],
|
||||
['1.0.0 - 2.0.0', '2.9.9'],
|
||||
['1.0.0', '1.0.0'],
|
||||
['>=*', '0.2.4'],
|
||||
['', '1.0.0', true],
|
||||
['*', '1.2.3'],
|
||||
['>=1.0.0', '1.0.0'],
|
||||
['>=1.0.0', '1.0.1'],
|
||||
['>=1.0.0', '1.1.0'],
|
||||
['>1.0.0', '1.0.1'],
|
||||
['>1.0.0', '1.1.0'],
|
||||
['<=2.0.0', '2.0.0'],
|
||||
['<=2.0.0', '1.9999.9999'],
|
||||
['<=2.0.0', '0.2.9'],
|
||||
['<2.0.0', '1.9999.9999'],
|
||||
['<2.0.0', '0.2.9'],
|
||||
['>= 1.0.0', '1.0.0'],
|
||||
['>= 1.0.0', '1.0.1'],
|
||||
['>= 1.0.0', '1.1.0'],
|
||||
['> 1.0.0', '1.0.1'],
|
||||
['> 1.0.0', '1.1.0'],
|
||||
['<= 2.0.0', '2.0.0'],
|
||||
['<= 2.0.0', '1.9999.9999'],
|
||||
['<= 2.0.0', '0.2.9'],
|
||||
['< 2.0.0', '1.9999.9999'],
|
||||
['<\t2.0.0', '0.2.9'],
|
||||
['>=0.1.97', 'v0.1.97'],
|
||||
['>=0.1.97', '0.1.97'],
|
||||
['0.1.20 || 1.2.4', '1.2.4'],
|
||||
['0.1.20 || >1.2.4', '1.2.4'],
|
||||
['0.1.20 || 1.2.4', '1.2.3'],
|
||||
['0.1.20 || 1.2.4', '0.1.20'],
|
||||
['>=0.2.3 || <0.0.1', '0.0.0'],
|
||||
['>=0.2.3 || <0.0.1', '0.2.3'],
|
||||
['>=0.2.3 || <0.0.1', '0.2.4'],
|
||||
['||', '1.3.4'],
|
||||
['2.x.x', '2.1.3'],
|
||||
['1.2.x', '1.2.3'],
|
||||
['1.2.x || 2.x', '2.1.3'],
|
||||
['1.2.x || 2.x', '1.2.3'],
|
||||
['x', '1.2.3'],
|
||||
['2.*.*', '2.1.3'],
|
||||
['1.2.*', '1.2.3'],
|
||||
['1.2.* || 2.*', '2.1.3'],
|
||||
['1.2.* || 2.*', '1.2.3'],
|
||||
['1.2.* || 2.*', '1.2.3'],
|
||||
['*', '1.2.3'],
|
||||
['2', '2.1.2'],
|
||||
['2.3', '2.3.1'],
|
||||
['~2.4', '2.4.0'], // >=2.4.0 <2.5.0
|
||||
['~2.4', '2.4.5'],
|
||||
['~>3.2.1', '3.2.2'], // >=3.2.1 <3.3.0
|
||||
['~1', '1.2.3'], // >=1.0.0 <2.0.0
|
||||
['~>1', '1.2.3'],
|
||||
['~> 1', '1.2.3'],
|
||||
['~1.0', '1.0.2'], // >=1.0.0 <1.1.0
|
||||
['~ 1.0', '1.0.2'],
|
||||
['>=1', '1.0.0'],
|
||||
['>= 1', '1.0.0'],
|
||||
['<1.2', '1.1.1'],
|
||||
['< 1.2', '1.1.1'],
|
||||
['~v0.5.4-pre', '0.5.5'],
|
||||
['~v0.5.4-pre', '0.5.4'],
|
||||
['=0.7.x', '0.7.2'],
|
||||
['>=0.7.x', '0.7.2'],
|
||||
['<=0.7.x', '0.6.2'],
|
||||
['>0.2.3 >0.2.4 <=0.2.5', '0.2.5'],
|
||||
['>=0.2.3 <=0.2.4', '0.2.4'],
|
||||
['1.0.0 - 2.0.0', '2.0.0'],
|
||||
['^3.0.0', '4.0.0'],
|
||||
['^1.0.0 || ~2.0.1', '2.0.0'],
|
||||
['^0.1.0 || ~3.0.1 || 5.0.0', '3.2.0'],
|
||||
['^0.1.0 || ~3.0.1 || 5.0.0', '1.0.0beta', true],
|
||||
['^0.1.0 || ~3.0.1 || 5.0.0', '5.0.0-0', true],
|
||||
['^0.1.0 || ~3.0.1 || >4 <=5.0.0', '3.5.0'],
|
||||
['^1.0.0alpha', '1.0.0beta', true],
|
||||
['~1.0.0alpha', '1.0.0beta', true],
|
||||
['^1.0.0-alpha', '1.0.0beta', true],
|
||||
['~1.0.0-alpha', '1.0.0beta', true],
|
||||
['^1.0.0-alpha', '1.0.0-beta'],
|
||||
['~1.0.0-alpha', '1.0.0-beta'],
|
||||
['=0.1.0', '1.0.0']
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var loose = tuple[2] || false;
|
||||
var msg = '!ltr(' + version + ', ' + range + ', ' + loose + ')';
|
||||
t.notOk(ltr(version, range, loose), msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
72
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/major-minor-patch.js
generated
vendored
Normal file
72
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/major-minor-patch.js
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
var tap = require('tap');
|
||||
var test = tap.test;
|
||||
var semver = require('../semver.js');
|
||||
|
||||
test('\nmajor tests', function(t) {
|
||||
// [range, version]
|
||||
// Version should be detectable despite extra characters
|
||||
[
|
||||
['1.2.3', 1],
|
||||
[' 1.2.3 ', 1],
|
||||
[' 2.2.3-4 ', 2],
|
||||
[' 3.2.3-pre ', 3],
|
||||
['v5.2.3', 5],
|
||||
[' v8.2.3 ', 8],
|
||||
['\t13.2.3', 13],
|
||||
['=21.2.3', 21, true],
|
||||
['v=34.2.3', 34, true]
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var loose = tuple[2] || false;
|
||||
var msg = 'major(' + range + ') = ' + version;
|
||||
t.equal(semver.major(range, loose), version, msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\nminor tests', function(t) {
|
||||
// [range, version]
|
||||
// Version should be detectable despite extra characters
|
||||
[
|
||||
['1.1.3', 1],
|
||||
[' 1.1.3 ', 1],
|
||||
[' 1.2.3-4 ', 2],
|
||||
[' 1.3.3-pre ', 3],
|
||||
['v1.5.3', 5],
|
||||
[' v1.8.3 ', 8],
|
||||
['\t1.13.3', 13],
|
||||
['=1.21.3', 21, true],
|
||||
['v=1.34.3', 34, true]
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var loose = tuple[2] || false;
|
||||
var msg = 'minor(' + range + ') = ' + version;
|
||||
t.equal(semver.minor(range, loose), version, msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('\npatch tests', function(t) {
|
||||
// [range, version]
|
||||
// Version should be detectable despite extra characters
|
||||
[
|
||||
['1.2.1', 1],
|
||||
[' 1.2.1 ', 1],
|
||||
[' 1.2.2-4 ', 2],
|
||||
[' 1.2.3-pre ', 3],
|
||||
['v1.2.5', 5],
|
||||
[' v1.2.8 ', 8],
|
||||
['\t1.2.13', 13],
|
||||
['=1.2.21', 21, true],
|
||||
['v=1.2.34', 34, true]
|
||||
].forEach(function(tuple) {
|
||||
var range = tuple[0];
|
||||
var version = tuple[1];
|
||||
var loose = tuple[2] || false;
|
||||
var msg = 'patch(' + range + ') = ' + version;
|
||||
t.equal(semver.patch(range, loose), version, msg);
|
||||
});
|
||||
t.end();
|
||||
});
|
||||
19
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/no-module.js
generated
vendored
Normal file
19
static/js/ketcher2/node_modules/gulp/node_modules/semver/test/no-module.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
var tap = require('tap');
|
||||
var test = tap.test;
|
||||
|
||||
test('no module system', function(t) {
|
||||
var fs = require('fs');
|
||||
var vm = require('vm');
|
||||
var head = fs.readFileSync(require.resolve('../head.js.txt'), 'utf8');
|
||||
var src = fs.readFileSync(require.resolve('../'), 'utf8');
|
||||
var foot = fs.readFileSync(require.resolve('../foot.js.txt'), 'utf8');
|
||||
vm.runInThisContext(head + src + foot, 'semver.js');
|
||||
|
||||
// just some basic poking to see if it did some stuff
|
||||
t.type(global.semver, 'object');
|
||||
t.type(global.semver.SemVer, 'function');
|
||||
t.type(global.semver.Range, 'function');
|
||||
t.ok(global.semver.satisfies('1.2.3', '1.2'));
|
||||
t.end();
|
||||
});
|
||||
|
||||
107
static/js/ketcher2/node_modules/gulp/package.json
generated
vendored
Normal file
107
static/js/ketcher2/node_modules/gulp/package.json
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
{
|
||||
"_from": "gulp@3.9.1",
|
||||
"_id": "gulp@3.9.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=",
|
||||
"_location": "/gulp",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "gulp@3.9.1",
|
||||
"name": "gulp",
|
||||
"escapedName": "gulp",
|
||||
"rawSpec": "3.9.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.9.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz",
|
||||
"_shasum": "571ce45928dd40af6514fc4011866016c13845b4",
|
||||
"_spec": "gulp@3.9.1",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher",
|
||||
"author": {
|
||||
"name": "Fractal",
|
||||
"email": "contact@wearefractal.com",
|
||||
"url": "http://wearefractal.com/"
|
||||
},
|
||||
"bin": {
|
||||
"gulp": "./bin/gulp.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gulpjs/gulp/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"archy": "^1.0.0",
|
||||
"chalk": "^1.0.0",
|
||||
"deprecated": "^0.0.1",
|
||||
"gulp-util": "^3.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"liftoff": "^2.1.0",
|
||||
"minimist": "^1.1.0",
|
||||
"orchestrator": "^0.3.0",
|
||||
"pretty-hrtime": "^1.0.0",
|
||||
"semver": "^4.1.0",
|
||||
"tildify": "^1.0.0",
|
||||
"v8flags": "^2.0.2",
|
||||
"vinyl-fs": "^0.3.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "The streaming build system",
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.7.0",
|
||||
"eslint": "^1.7.3",
|
||||
"eslint-config-gulp": "^2.0.0",
|
||||
"graceful-fs": "^3.0.0",
|
||||
"istanbul": "^0.3.0",
|
||||
"jscs": "^2.3.5",
|
||||
"jscs-preset-gulp": "^1.0.0",
|
||||
"marked-man": "^0.1.3",
|
||||
"mkdirp": "^0.5.0",
|
||||
"mocha": "^2.0.1",
|
||||
"mocha-lcov-reporter": "^0.0.1",
|
||||
"q": "^1.0.0",
|
||||
"rimraf": "^2.2.5",
|
||||
"should": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.9"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib",
|
||||
"bin",
|
||||
"completion",
|
||||
"gulp.1"
|
||||
],
|
||||
"homepage": "http://gulpjs.com",
|
||||
"license": "MIT",
|
||||
"man": [
|
||||
"gulp.1"
|
||||
],
|
||||
"name": "gulp",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gulpjs/gulp.git"
|
||||
},
|
||||
"scripts": {
|
||||
"coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
|
||||
"lint": "eslint . && jscs *.js bin/ lib/ test/",
|
||||
"prepublish": "marked-man --name gulp docs/CLI.md > gulp.1",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --reporter spec"
|
||||
},
|
||||
"tags": [
|
||||
"build",
|
||||
"stream",
|
||||
"system",
|
||||
"make",
|
||||
"tool",
|
||||
"asset",
|
||||
"pipeline"
|
||||
],
|
||||
"version": "3.9.1"
|
||||
}
|
||||
Reference in New Issue
Block a user