New Upstream Snapshot - node-uglify-save-license
Ready changes
Summary
Merged new upstream version: 0.4.1+git20161013.1.e8abfd7 (was: 0.4.1).
Resulting package
Built on 2022-12-19T21:07 (took 6m55s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots node-uglify-save-license
Lintian Result
Diff
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 6b750c2..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-actual/
-
-# Node
-# https://github.com/github/gitignore/blob/master/Node.gitignore
-
-lib-cov
-*.seed
-*.log
-*.csv
-*.dat
-*.out
-*.pid
-*.gz
-
-pids
-logs
-results
-
-npm-debug.log
-node_modules
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 5287fc8..0000000
--- a/.jshintrc
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "camelcase": true,
- "indent": 2,
- "quotmark": "single",
- "browser": false,
- "node": true
-}
diff --git a/.npmignore b/.npmignore
deleted file mode 100644
index 0b3cf3f..0000000
--- a/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.travis.yml
-.jshintrc
-Gruntfile.coffee
-test/
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 607bd79..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
- - "0.11"
-before_script:
- - npm install -g grunt-cli
-notifications:
- email: false
\ No newline at end of file
diff --git a/Gruntfile.coffee b/Gruntfile.coffee
deleted file mode 100644
index a6110e7..0000000
--- a/Gruntfile.coffee
+++ /dev/null
@@ -1,86 +0,0 @@
-module.exports = (grunt) ->
- 'use strict'
-
- require('load-grunt-tasks') grunt
- semver = require 'semver'
-
- pkg = grunt.file.readJSON 'package.json'
-
- getNextVersion = ->
- currentVer = pkg.version
- semver.inc currentVer, 'patch'
-
- grunt.initConfig
- jshint:
- options:
- jshintrc: '.jshintrc'
- main:
- files:
- src: ['uglify-save-license.js']
- test:
- files:
- src: '<%= nodeunit.all %>'
-
- clean:
- test:
- src: ['test/actual/*.js']
-
- replace:
- version:
- options:
- prefix: ' v'
- preservePrefix: true
- patterns: [
- match: pkg.version
- replacement: getNextVersion()
- ]
- files:
- 'uglify-save-license.js': ['uglify-save-license.js']
- year:
- options:
- prefix: '2013 - '
- preservePrefix: true
- patterns: [
- match: "#{ new Date().getFullYear() - 1 }"
- replacement: "#{ new Date().getFullYear() }"
- ]
- files:
- 'uglify-save-license.js': ['uglify-save-license.js']
-
- uglify:
- options:
- preserveComments: ->
- args = grunt.util.toArray arguments
- require('./uglify-save-license.js') args...
- fixture:
- files: [
- expand: true
- cwd: 'test/fixtures'
- src: '{,*/}*.js'
- dest: 'test/actual'
- ]
-
- nodeunit:
- options:
- reporter: 'default'
- all: ['test/test.js']
-
- watch:
- main:
- files: ['uglify-save-license.js']
- tasks: ['build']
-
- release: {}
-
- grunt.registerTask 'test', [
- 'jshint'
- 'clean'
- 'uglify'
- 'nodeunit'
- ]
-
- grunt.registerTask 'build', ['replace', 'test']
-
- grunt.registerTask 'default', ['build', 'watch']
-
- grunt.registerTask 'publish', ['build', 'release:patch']
diff --git a/README.md b/README.md
index 9627218..e9cf484 100644
--- a/README.md
+++ b/README.md
@@ -91,9 +91,15 @@ grunt.initConfig({
The comment will be regarded as a license statement and preserved after compression, if it meets at least one of the following requirements:
1. The comment is in the *first* line of a file.
-2. [The regexp for license statement](./uglify-save-license.js#L7) matches the string of the comment. It matches, for example, `MIT` and `Copyright`.
+2. [The regexp for license statement](https://github.com/shinnn/uglify-save-license/blob/451c8b0f549dbb74d62096f00b939f9c35942632/index.js#L7) matches the string of the comment. It matches, for example, `MIT` and `Copyright`.
3. There is a comment at the *previous* line, and it matches 1. 2. or 3.
+## Used by
+
+* [Blanket.js](https://github.com/alex-seville/blanket) ([Alex Seville](https://github.com/alex-seville))
+* [generator-gulp-angular](https://github.com/Swiip/generator-gulp-angular) ([Matthieu Lux](https://github.com/Swiip))
+* [gulp plugins](https://github.com/gulpjs/plugins) ([Robin Böhm](https://github.com/robinboehm), [Max Ovsiankin](https://github.com/gratimax))
+
## Examples
### CLI tool example
diff --git a/debian/changelog b/debian/changelog
index d8429d5..f69672b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
-node-uglify-save-license (0.4.1-3) UNRELEASED; urgency=medium
+node-uglify-save-license (0.4.1+git20161013.1.e8abfd7-1) UNRELEASED; urgency=medium
* Update standards version to 4.6.1, no changes needed.
+ * New upstream snapshot.
- -- Debian Janitor <janitor@jelmer.uk> Wed, 16 Nov 2022 11:27:57 -0000
+ -- Debian Janitor <janitor@jelmer.uk> Mon, 19 Dec 2022 21:03:49 -0000
node-uglify-save-license (0.4.1-2) unstable; urgency=medium
diff --git a/uglify-save-license.js b/index.js
similarity index 83%
rename from uglify-save-license.js
rename to index.js
index 2ac9769..972cb44 100644
--- a/uglify-save-license.js
+++ b/index.js
@@ -1,4 +1,4 @@
-// uglify-save-license.js v0.4.1
+// uglify-save-license.js v0.4.2
// Copyright (c) 2013 - 2014 Shinnosuke Watanabe
// Licensed uder the MIT license
@@ -17,18 +17,17 @@ module.exports = function saveLicense(node, comment) {
}
var isLicense = licenseRegexp.test(comment.value) ||
- (comment.type === 'comment2' &&
- comment.value.charAt(0) === '!') ||
+ (comment.type === 'comment2' && comment.value.charAt(0) === '!') ||
comment.line === 1 ||
comment.line === prevCommentLine + 1;
-
+
if (isLicense) {
prevCommentLine = comment.line;
} else {
prevCommentLine = 0;
}
-
+
prevFile = comment.file;
-
+
return isLicense;
};
diff --git a/package.json b/package.json
index 8d27d9d..524fabe 100644
--- a/package.json
+++ b/package.json
@@ -2,9 +2,12 @@
"name": "uglify-save-license",
"version": "0.4.1",
"description": "License detector for UglifyJS",
- "main": "./uglify-save-license.js",
+ "files": [
+ "index.js",
+ "LICENSE"
+ ],
"scripts": {
- "test": "grunt build"
+ "test": "grunt test"
},
"repository": {
"type": "git",
@@ -37,15 +40,12 @@
},
"homepage": "https://github.com/shinnn/uglify-save-license",
"devDependencies": {
- "grunt": "^0.4.4",
- "load-grunt-tasks": "^0.4.0",
+ "grunt": "^0.4.5",
+ "grunt-contrib-clean": "^0.6.0",
"grunt-contrib-jshint": "^0.10.0",
+ "grunt-contrib-nodeunit": "^0.4.1",
+ "grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
- "grunt-contrib-uglify": "^0.4.0",
- "grunt-contrib-clean": "^0.5.0",
- "grunt-contrib-nodeunit": "^0.3.3",
- "grunt-release": "^0.7.0",
- "grunt-replace": "^0.7.7",
- "semver": "^2.2.1"
+ "jit-grunt": "^0.9.0"
}
}
diff --git a/test/expected/block-series.js b/test/expected/block-series.js
deleted file mode 100644
index adef163..0000000
--- a/test/expected/block-series.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* First block */
-/* Second block */
diff --git a/test/expected/first-block.js b/test/expected/first-block.js
deleted file mode 100644
index 7e7099b..0000000
--- a/test/expected/first-block.js
+++ /dev/null
@@ -1 +0,0 @@
-/* First block */
diff --git a/test/expected/first-line.js b/test/expected/first-line.js
deleted file mode 100644
index bfdee39..0000000
--- a/test/expected/first-line.js
+++ /dev/null
@@ -1 +0,0 @@
-// First line
diff --git a/test/expected/line-after-newline.js b/test/expected/line-after-newline.js
deleted file mode 100644
index e69de29..0000000
diff --git a/test/expected/line-series.js b/test/expected/line-series.js
deleted file mode 100644
index 64c7f4b..0000000
--- a/test/expected/line-series.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// First line
-// Second line
diff --git a/test/expected/regexp/at_cc_on.js b/test/expected/regexp/at_cc_on.js
deleted file mode 100644
index 46d3193..0000000
--- a/test/expected/regexp/at_cc_on.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// @cc_on directive
-// @cc_on This line should be preserved.
diff --git a/test/expected/regexp/at_preserve.js b/test/expected/regexp/at_preserve.js
deleted file mode 100644
index 9ca33fb..0000000
--- a/test/expected/regexp/at_preserve.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// @preserve directive
-// @preserve This line should be preserved.
diff --git a/test/expected/regexp/copyright.js b/test/expected/regexp/copyright.js
deleted file mode 100644
index f9809cf..0000000
--- a/test/expected/regexp/copyright.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// Copyright string
-// Copyright <year> This line should be preserved.
diff --git a/test/expected/regexp/copyright_mark.js b/test/expected/regexp/copyright_mark.js
deleted file mode 100644
index b2d1b00..0000000
--- a/test/expected/regexp/copyright_mark.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// Copyright mark
-// (c) This line should be preserved.
diff --git a/test/expected/regexp/mit.js b/test/expected/regexp/mit.js
deleted file mode 100644
index 5ed19cf..0000000
--- a/test/expected/regexp/mit.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// MIT license
-// (MIT) This line should be preserved.
diff --git a/test/expected/separated-block-license.js b/test/expected/separated-block-license.js
deleted file mode 100644
index fe153ef..0000000
--- a/test/expected/separated-block-license.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* First block */
-/* Second block (MIT) */
diff --git a/test/expected/separated-block.js b/test/expected/separated-block.js
deleted file mode 100644
index 7e7099b..0000000
--- a/test/expected/separated-block.js
+++ /dev/null
@@ -1 +0,0 @@
-/* First block */
diff --git a/test/expected/separated-line-license.js b/test/expected/separated-line-license.js
deleted file mode 100644
index bb142f9..0000000
--- a/test/expected/separated-line-license.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// First line
-// (c) Second line
diff --git a/test/expected/separated-line.js b/test/expected/separated-line.js
deleted file mode 100644
index bfdee39..0000000
--- a/test/expected/separated-line.js
+++ /dev/null
@@ -1 +0,0 @@
-// First line
diff --git a/test/expected/start_with_bang/block_bang.js b/test/expected/start_with_bang/block_bang.js
deleted file mode 100644
index 8f72570..0000000
--- a/test/expected/start_with_bang/block_bang.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// Start with bang (block comment)
-/*! This line should be preserved. */
diff --git a/test/expected/start_with_bang/line_bang.js b/test/expected/start_with_bang/line_bang.js
deleted file mode 100644
index 00f6c08..0000000
--- a/test/expected/start_with_bang/line_bang.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// Start with bang (line comment)
-// Any comments should not exist below.
diff --git a/test/fixtures/block-series.js b/test/fixtures/block-series.js
deleted file mode 100644
index adef163..0000000
--- a/test/fixtures/block-series.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* First block */
-/* Second block */
diff --git a/test/fixtures/first-block.js b/test/fixtures/first-block.js
deleted file mode 100644
index 7e7099b..0000000
--- a/test/fixtures/first-block.js
+++ /dev/null
@@ -1 +0,0 @@
-/* First block */
diff --git a/test/fixtures/first-line.js b/test/fixtures/first-line.js
deleted file mode 100644
index bfdee39..0000000
--- a/test/fixtures/first-line.js
+++ /dev/null
@@ -1 +0,0 @@
-// First line
diff --git a/test/fixtures/line-after-newline.js b/test/fixtures/line-after-newline.js
deleted file mode 100644
index a72fa2f..0000000
--- a/test/fixtures/line-after-newline.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-// First line after a line break
diff --git a/test/fixtures/line-series.js b/test/fixtures/line-series.js
deleted file mode 100644
index 64c7f4b..0000000
--- a/test/fixtures/line-series.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// First line
-// Second line
diff --git a/test/fixtures/regexp/at_cc_on.js b/test/fixtures/regexp/at_cc_on.js
deleted file mode 100644
index 417eba4..0000000
--- a/test/fixtures/regexp/at_cc_on.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// @cc_on directive
-
-// @cc_on This line should be preserved.
\ No newline at end of file
diff --git a/test/fixtures/regexp/at_preserve.js b/test/fixtures/regexp/at_preserve.js
deleted file mode 100644
index 63cf55d..0000000
--- a/test/fixtures/regexp/at_preserve.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// @preserve directive
-
-// @preserve This line should be preserved.
\ No newline at end of file
diff --git a/test/fixtures/regexp/copyright.js b/test/fixtures/regexp/copyright.js
deleted file mode 100644
index 2d35096..0000000
--- a/test/fixtures/regexp/copyright.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// Copyright string
-
-// Copyright <year> This line should be preserved.
diff --git a/test/fixtures/regexp/copyright_mark.js b/test/fixtures/regexp/copyright_mark.js
deleted file mode 100644
index 131e91a..0000000
--- a/test/fixtures/regexp/copyright_mark.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// Copyright mark
-
-// (c) This line should be preserved.
diff --git a/test/fixtures/regexp/mit.js b/test/fixtures/regexp/mit.js
deleted file mode 100644
index e80f56f..0000000
--- a/test/fixtures/regexp/mit.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// MIT license
-
-// (MIT) This line should be preserved.
diff --git a/test/fixtures/separated-block-license.js b/test/fixtures/separated-block-license.js
deleted file mode 100644
index 86b06ed..0000000
--- a/test/fixtures/separated-block-license.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/* First block */
-
-/* Second block (MIT) */
diff --git a/test/fixtures/separated-block.js b/test/fixtures/separated-block.js
deleted file mode 100644
index c4f1a21..0000000
--- a/test/fixtures/separated-block.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/* First block */
-
-/* This block should not be saved */
diff --git a/test/fixtures/separated-line-license.js b/test/fixtures/separated-line-license.js
deleted file mode 100644
index 29affc5..0000000
--- a/test/fixtures/separated-line-license.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// First line
-
-// (c) Second line
diff --git a/test/fixtures/separated-line.js b/test/fixtures/separated-line.js
deleted file mode 100644
index c462183..0000000
--- a/test/fixtures/separated-line.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// First line
-
-// This line should not be saved.
diff --git a/test/fixtures/start_with_bang/block_bang.js b/test/fixtures/start_with_bang/block_bang.js
deleted file mode 100644
index eae09ca..0000000
--- a/test/fixtures/start_with_bang/block_bang.js
+++ /dev/null
@@ -1,3 +0,0 @@
-// Start with bang (block comment)
-
-/*! This line should be preserved. */
diff --git a/test/fixtures/start_with_bang/line_bang.js b/test/fixtures/start_with_bang/line_bang.js
deleted file mode 100644
index a0a74db..0000000
--- a/test/fixtures/start_with_bang/line_bang.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// Start with bang (line comment)
-// Any comments should not exist below.
-
-//! This line should not be preserved.
diff --git a/test/test.js b/test/test.js
deleted file mode 100644
index 673af8d..0000000
--- a/test/test.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict';
-
-var path = require('path');
-var grunt = require('grunt');
-
-var files = grunt.file.expandMapping (
- '{,*/,*/*/}*.js',
- 'test/expected',
- { cwd: 'test/actual' }
-);
-
-function exportTests (map) {
- var basename = path.basename(map.src);
-
- exports[basename] = function (test) {
- var actual = grunt.file.read(map.src);
- var expected = grunt.file.read(map.dest);
-
- test.strictEqual(
- actual,
- expected
- );
- test.done();
- };
-}
-
-files.forEach(exportTests);
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/share/nodejs/uglify-save-license/index.js
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/share/nodejs/uglify-save-license/uglify-save-license.js
No differences were encountered in the control files