@rhinostone/swig 1.4.5 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.changes/v1.4.6.md +6 -0
- package/HISTORY.md +7 -0
- package/ROADMAP.md +5 -1
- package/bin/swig.js +3 -3
- package/lib/swig.js +2 -2
- package/package.json +2 -3
- package/.github/workflows/ci.yml +0 -19
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[1.4.6](https://github.com/gina-io/swig/tree/v1.4.6) / 2026-04-10
|
|
2
|
+
-----------------------------------------------------------------
|
|
3
|
+
|
|
4
|
+
* **Changed** Exclude `.github/` from npm tarball
|
|
5
|
+
|
|
6
|
+
* **Changed** Replace `uglify-js` with `terser` in CLI (`--minify` flag), removing the last Snyk-flagged runtime dependency (ReDoS, CVE in uglify-js@2.4)
|
package/HISTORY.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
[1.4.6](https://github.com/gina-io/swig/tree/v1.4.6) / 2026-04-10
|
|
2
|
+
-----------------------------------------------------------------
|
|
3
|
+
|
|
4
|
+
* **Changed** Exclude `.github/` from npm tarball
|
|
5
|
+
|
|
6
|
+
* **Changed** Replace `uglify-js` with `terser` in CLI (`--minify` flag), removing the last Snyk-flagged runtime dependency (ReDoS, CVE in uglify-js@2.4)
|
|
7
|
+
|
|
1
8
|
[1.4.5](https://github.com/gina-io/swig/tree/v1.4.5) / 2026-04-10
|
|
2
9
|
-----------------------------------------------------------------
|
|
3
10
|
|
package/ROADMAP.md
CHANGED
|
@@ -10,13 +10,17 @@ For bug reports and feature requests, file an issue at [gina-io/swig](https://gi
|
|
|
10
10
|
|
|
11
11
|
| Status | Item |
|
|
12
12
|
| --- | --- |
|
|
13
|
-
| Planned | Investigate replacing external deps with internal modules |
|
|
14
13
|
| Planned | Full security audit of dependency tree, template pipeline, and CLI argv flow |
|
|
15
14
|
|
|
16
15
|
---
|
|
17
16
|
|
|
18
17
|
## Completed
|
|
19
18
|
|
|
19
|
+
### v1.4.6 (April 2026)
|
|
20
|
+
|
|
21
|
+
- Replace `uglify-js` with `terser` in CLI (`--minify` flag), removing the last Snyk-flagged runtime dependency
|
|
22
|
+
- Exclude `.github/` from npm tarball
|
|
23
|
+
|
|
20
24
|
### v1.4.5 (April 2026)
|
|
21
25
|
|
|
22
26
|
- Replace `optimist` with `yargs` in CLI, removing `minimist` from the production dependency tree entirely (CVE-2021-44906 fully resolved)
|
package/bin/swig.js
CHANGED
|
@@ -7,7 +7,7 @@ var swig = require('../index'),
|
|
|
7
7
|
path = require('path'),
|
|
8
8
|
filters = require('../lib/filters'),
|
|
9
9
|
utils = require('../lib/utils'),
|
|
10
|
-
|
|
10
|
+
terser = require('terser');
|
|
11
11
|
|
|
12
12
|
var command,
|
|
13
13
|
wrapstart = 'var tpl = ',
|
|
@@ -23,7 +23,7 @@ var command,
|
|
|
23
23
|
h: 'Show this help screen.',
|
|
24
24
|
j: 'Variable context as a JSON file.',
|
|
25
25
|
c: 'Variable context as a CommonJS-style file. Used only if option `j` is not provided.',
|
|
26
|
-
m: 'Minify compiled functions with
|
|
26
|
+
m: 'Minify compiled functions with terser',
|
|
27
27
|
'filters': 'Custom filters as a CommonJS-style file',
|
|
28
28
|
'tags': 'Custom tags as a CommonJS-style file',
|
|
29
29
|
'options': 'Customize Swig\'s Options from a CommonJS-style file',
|
|
@@ -134,7 +134,7 @@ case 'compile':
|
|
|
134
134
|
r = argv['wrap-start'] + r + argv['wrap-end'];
|
|
135
135
|
|
|
136
136
|
if (argv.m) {
|
|
137
|
-
r =
|
|
137
|
+
r = terser.minify_sync(r).code;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
out(file, r);
|
package/lib/swig.js
CHANGED
|
@@ -8,11 +8,11 @@ var utils = require('./utils'),
|
|
|
8
8
|
/**
|
|
9
9
|
* Swig version number as a string.
|
|
10
10
|
* @example
|
|
11
|
-
* if (swig.version === "1.4.
|
|
11
|
+
* if (swig.version === "1.4.6") { ... }
|
|
12
12
|
*
|
|
13
13
|
* @type {String}
|
|
14
14
|
*/
|
|
15
|
-
exports.version = "1.4.
|
|
15
|
+
exports.version = "1.4.6";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Swig Options Object. This object can be passed to many of the API-level Swig methods to control various aspects of the engine. All keys are optional.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinostone/swig",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "A simple, powerful, and extendable templating engine for node.js and browsers, similar to Django, Jinja2, and Twig.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"template",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"Rhinostone <contact@gina.io>"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"
|
|
24
|
+
"terser": "^5.46.1",
|
|
25
25
|
"yargs": "~3.32"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"mocha-phantomjs": "~3.1",
|
|
39
39
|
"phantomjs": "~1.9.1",
|
|
40
40
|
"still": "0.0.7",
|
|
41
|
-
"terser": "^5.46.1",
|
|
42
41
|
"travis-cov": "~0.2"
|
|
43
42
|
},
|
|
44
43
|
"license": "MIT",
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [develop, master]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [develop, master]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
lint-and-test:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
- uses: actions/setup-node@v4
|
|
15
|
-
with:
|
|
16
|
-
node-version: 20
|
|
17
|
-
- run: npm install --depth=100 --loglevel=error
|
|
18
|
-
- run: make lint
|
|
19
|
-
- run: make test
|