Repository: twigjs/twig.js
Pull request #858 (2023-02-28 02:21:05)

Update to v1.16.0


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c4edf0..6ae9545 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,30 @@
+Version 1.16.0, release 2023-02-27
+----------------------------------
+Major improvements:
+* Fix passing context around by @willrowe in https://github.com/twigjs/twig.js/pull/850
+* Add namespace support to `source` function by @willrowe in https://github.com/twigjs/twig.js/pull/823
+* Use src/twig.js as package's main script instead of the compiled twig.js by @RobLoach in https://github.com/twigjs/twig.js/pull/829
+
+Minor improvements:
+* Fix macro changing context in loop by @mihkeleidast in https://github.com/twigjs/twig.js/pull/773
+* Imported function PATHS.strip_slash() missing by @murageyun in https://github.com/twigjs/twig.js/pull/770
+* Convert non-string values to string before replacing by @kmonahan in https://github.com/twigjs/twig.js/pull/797
+* Add GitHub actions test workflow by @willrowe in https://github.com/twigjs/twig.js/pull/817
+* Fix date parsing with timezones by @plepe in https://github.com/twigjs/twig.js/pull/765
+* Fixed Twig official's URL on README.md by @Geolim4 in https://github.com/twigjs/twig.js/pull/822
+* Add tests for whitespace in paths by @willrowe in https://github.com/twigjs/twig.js/pull/824
+* Fix multiple includes with embeds by @willrowe in https://github.com/twigjs/twig.js/pull/828
+* Update to Mocha 9.x by @RobLoach in https://github.com/twigjs/twig.js/pull/831
+* Add test for issue #767 by @willrowe in https://github.com/twigjs/twig.js/pull/837
+* Add support for `divisible by` test by @willrowe in https://github.com/twigjs/twig.js/pull/838
+* Add support for `with` tag without context or `only` keyword by @willrowe in https://github.com/twigjs/twig.js/pull/839
+* Use v3 of `actions/checkout` by @willrowe in https://github.com/twigjs/twig.js/pull/846
+* Test on more node versions by @willrowe in https://github.com/twigjs/twig.js/pull/847
+* Fix webpack 5 compatibility by @willrowe in https://github.com/twigjs/twig.js/pull/849
+* Add test to confirm `renderFile` error handling by @willrowe in https://github.com/twigjs/twig.js/pull/851
+* Fix casing of variables in docs by @willrowe in https://github.com/twigjs/twig.js/pull/852
+* Bumped dependencies by @dependabot
+
 Version 1.15.4, released 2020-11-27
 -----------------------------------
 Minor improvements:
diff --git a/package-lock.json b/package-lock.json
index 3e2561c..0fdc665 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "twig",
-  "version": "1.15.4",
+  "version": "1.16.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/package.json b/package.json
index ea9a521..9ba44fd 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "author": "John Roepke <john@justjohn.us> (http://john.sh/)",
   "name": "twig",
   "description": "JS port of the Twig templating language.",
-  "version": "1.15.4",
+  "version": "1.16.0",
   "homepage": "https://github.com/twigjs/twig.js",
   "license": "BSD-2-Clause",
   "licenses": [
diff --git a/src/twig.factory.js b/src/twig.factory.js
index 6c2f851..d0341d6 100644
--- a/src/twig.factory.js
+++ b/src/twig.factory.js
@@ -3,7 +3,7 @@
 // This file handles creating the Twig library
 module.exports = function factory() {
     const Twig = {
-        VERSION: '1.14.0'
+        VERSION: '1.16.0'
     };
 
     require('./twig.core')(Twig);


Test patch:
diff --git a/test/test.factory.js b/test/test.factory.js
index 3c8a5bb..f2dba5b 100644
--- a/test/test.factory.js
+++ b/test/test.factory.js
@@ -11,6 +11,15 @@ describe('Twig.js Factory ->', function () {
         return 'bar';
     });
 
+    it('should have the correct VERSION in twig.factory.js', function () {
+        // Twig.js embeds the version number in twig.factory.js to
+        // allow checking against Twig.VERSION. We should check to
+        // make sure the package.json version is the same.
+        const pkg = require('../package.json');
+        Twig.VERSION.should.not.be.null();
+        Twig.VERSION.should.equal(pkg.version);
+    });
+
     it('should not have access to extensions on the main Twig object', function () {
         const fixtOptions = {
             rethrow: true,