detect-templating-language 4.0.23 → 4.1.0

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/.eslintcache ADDED
@@ -0,0 +1 @@
1
+ [{"/home/runner/work/codsen/codsen/packages/detect-templating-language/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/detect-templating-language/perf/check.js":"2","/home/runner/work/codsen/codsen/packages/detect-templating-language/rollup.config.js":"3","/home/runner/work/codsen/codsen/packages/detect-templating-language/src/main.ts":"4","/home/runner/work/codsen/codsen/packages/detect-templating-language/test/test.js":"5"},{"size":424,"mtime":1760566739084,"results":"6","hashOfConfig":"7"},{"size":581,"mtime":1760566739084,"results":"8","hashOfConfig":"9"},{"size":373,"mtime":1760566739084,"results":"10","hashOfConfig":"7"},{"size":1065,"mtime":1760566739084,"results":"11","hashOfConfig":"9"},{"size":1790,"mtime":1760566739084,"results":"12","hashOfConfig":"13"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1nlhngw",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xjytlu",{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"nrihsz","/home/runner/work/codsen/codsen/packages/detect-templating-language/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/detect-templating-language/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/detect-templating-language/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/detect-templating-language/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/detect-templating-language/test/test.js",[],["29","30","31","32","33"],{"ruleId":"34","severity":2,"message":"35","line":3,"column":17,"nodeType":null,"messageId":"36","endLine":3,"endColumn":19,"suppressions":"37"},{"ruleId":"34","severity":2,"message":"38","line":3,"column":21,"nodeType":null,"messageId":"36","endLine":3,"endColumn":23,"suppressions":"39"},{"ruleId":"34","severity":2,"message":"40","line":3,"column":33,"nodeType":null,"messageId":"36","endLine":3,"endColumn":37,"suppressions":"41"},{"ruleId":"34","severity":2,"message":"42","line":3,"column":39,"nodeType":null,"messageId":"36","endLine":3,"endColumn":42,"suppressions":"43"},{"ruleId":"34","severity":2,"message":"44","line":3,"column":44,"nodeType":null,"messageId":"36","endLine":3,"endColumn":49,"suppressions":"45"},"@typescript-eslint/no-unused-vars","'is' is defined but never used.","unusedVar",["46"],"'ok' is defined but never used.",["47"],"'type' is defined but never used.",["48"],"'not' is defined but never used.",["49"],"'match' is defined but never used.",["50"],{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},{"kind":"51","justification":"52"},"directive",""]
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 4.1.0 (2025-10-15)
7
+
8
+ ### Features
9
+
10
+ - if value to be added is a number, keep it as is, don't stringify ([ce3e1a5](https://github.com/codsen/codsen/commit/ce3e1a525998ca3c0abf0142affef95b14cd1990))
11
+
6
12
  ## 4.0.0 (2022-12-01)
7
13
 
8
14
  ### BREAKING CHANGES
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-2025 Roy Revelt and other contributors
3
+ Copyright © 2010-2025 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -51,7 +51,7 @@ assert.deepEqual(
51
51
 
52
52
  ## Documentation
53
53
 
54
- Please [visit codsen.com](https://codsen.com/os/detect-templating-language/) for a full description of the API.
54
+ Please [visit codsen.com](https://codsen.com/os/detect-templating-language/) for a full description of the API. If you’re looking for the **Changelog**, it’s [here](https://github.com/codsen/codsen/blob/main/packages/detect-templating-language/CHANGELOG.md).
55
55
 
56
56
  ## Contributing
57
57
 
@@ -59,8 +59,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
59
59
 
60
60
  ## Licence
61
61
 
62
- MIT License.
62
+ MIT License
63
63
 
64
- Copyright © 2010-2025 Roy Revelt and other contributors.
64
+ Copyright © 2010-2025 Roy Revelt and other contributors
65
65
 
66
66
  <p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name detect-templating-language
3
3
  * @fileoverview Detects various templating languages present in string
4
- * @version 4.0.23
5
- * @author Roy Revelt, Codsen Ltd
4
+ * @version 4.1.0
5
+ * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/detect-templating-language/}
8
8
  */
9
9
 
10
- import{isJinjaNunjucksRegex as i}from"regex-is-jinja-nunjucks";import{isJSP as r}from"regex-is-jsp";import{isJinjaSpecific as p}from"regex-jinja-specific";var n="4.0.23";var d=n;function g(e){let t=null;if(typeof e!="string")throw new TypeError(`detect-templating-language: [THROW_ID_01] Input must be string! It was given as ${JSON.stringify(e,null,4)} (type ${typeof e}).`);return e?(i().test(e)?(t="Nunjucks",p().test(e)&&(t="Jinja")):r().test(e)&&(t="JSP"),{name:t}):{name:t}}export{g as detectLang,d as version};
10
+ import{isJinjaNunjucksRegex as i}from"regex-is-jinja-nunjucks";import{isJSP as r}from"regex-is-jsp";import{isJinjaSpecific as p}from"regex-jinja-specific";var n="4.1.0";var d=n;function g(e){let t=null;if(typeof e!="string")throw new TypeError(`detect-templating-language: [THROW_ID_01] Input must be string! It was given as ${JSON.stringify(e,null,4)} (type ${typeof e}).`);return e?(i().test(e)?(t="Nunjucks",p().test(e)&&(t="Jinja")):r().test(e)&&(t="JSP"),{name:t}):{name:t}}export{g as detectLang,d as version};
@@ -1,34 +1,34 @@
1
1
  /**
2
2
  * @name detect-templating-language
3
3
  * @fileoverview Detects various templating languages present in string
4
- * @version 4.0.23
5
- * @author Roy Revelt, Codsen Ltd
4
+ * @version 4.1.0
5
+ * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/detect-templating-language/}
8
8
  */
9
9
 
10
- "use strict";var detectTemplatingLanguage=(()=>{var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var m=(e,t)=>{for(var s in t)i(e,s,{get:t[s],enumerable:!0})},d=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l(t))!g.call(e,n)&&n!==s&&i(e,n,{get:()=>t[n],enumerable:!(r=c(t,n))||r.enumerable});return e};var f=e=>d(i({},"__esModule",{value:!0}),e);var y={};m(y,{detectLang:()=>x,version:()=>v});function p(){return/{%|{{|%}|}}/gi}function o(){return/<%|%>|<\s*jsp:|<\s*cms:|<\s*c:|\${\s*jsp/gi}function u(){return/(set\s*[\w]+\s*=\s*namespace\()|({{['"][\w]+['"]\s+if)|(['"]%x?[+0]?[.>^<]?\d+[\w%]['"]\|format\()/gi}var a="4.0.23";var v=a;function x(e){let t=null;if(typeof e!="string")throw new TypeError("detect-templating-language: [THROW_ID_01] Input must be string! It was given as ".concat(JSON.stringify(e,null,4)," (type ").concat(typeof e,")."));return e?(p().test(e)?(t="Nunjucks",u().test(e)&&(t="Jinja")):o().test(e)&&(t="JSP"),{name:t}):{name:t}}return f(y);})();
10
+ "use strict";var detectTemplatingLanguage=(()=>{var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var m=(e,t)=>{for(var s in t)i(e,s,{get:t[s],enumerable:!0})},d=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l(t))!g.call(e,n)&&n!==s&&i(e,n,{get:()=>t[n],enumerable:!(r=a(t,n))||r.enumerable});return e};var f=e=>d(i({},"__esModule",{value:!0}),e);var y={};m(y,{detectLang:()=>x,version:()=>v});function p(){return/{%|{{|%}|}}/gi}function o(){return/<%|%>|<\s*jsp:|<\s*cms:|<\s*c:|\${\s*jsp/gi}function c(){return/(set\s*[\w]+\s*=\s*namespace\()|({{['"][\w]+['"]\s+if)|(['"]%x?[+0]?[.>^<]?\d+[\w%]['"]\|format\()/gi}var u="4.1.0";var v=u;function x(e){let t=null;if(typeof e!="string")throw new TypeError("detect-templating-language: [THROW_ID_01] Input must be string! It was given as ".concat(JSON.stringify(e,null,4)," (type ").concat(typeof e,")."));return e?(p().test(e)?(t="Nunjucks",c().test(e)&&(t="Jinja")):o().test(e)&&(t="JSP"),{name:t}):{name:t}}return f(y);})();
11
11
  /**
12
12
  * @name regex-is-jinja-nunjucks
13
13
  * @fileoverview Regular expression for detecting Jinja or Nunjucks code
14
- * @version 4.0.19
15
- * @author Roy Revelt, Codsen Ltd
14
+ * @version 4.1.0
15
+ * @author Roy Revelt
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/regex-is-jinja-nunjucks/}
18
18
  */
19
19
  /**
20
20
  * @name regex-is-jsp
21
21
  * @fileoverview Regular expression for detecting JSP (Java Server Pages) code
22
- * @version 4.0.19
23
- * @author Roy Revelt, Codsen Ltd
22
+ * @version 4.1.0
23
+ * @author Roy Revelt
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/regex-is-jsp/}
26
26
  */
27
27
  /**
28
28
  * @name regex-jinja-specific
29
29
  * @fileoverview Regular expression for detecting Python-specific Jinja code
30
- * @version 4.0.19
31
- * @author Roy Revelt, Codsen Ltd
30
+ * @version 4.1.0
31
+ * @author Roy Revelt
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/regex-jinja-specific/}
34
34
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detect-templating-language",
3
- "version": "4.0.23",
3
+ "version": "4.1.0",
4
4
  "description": "Detects various templating languages present in string",
5
5
  "keywords": [
6
6
  "check",
@@ -39,7 +39,7 @@
39
39
  "examples": "node '../../ops/scripts/run-examples.js'",
40
40
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
41
41
  "letspublish": "npm publish --provenance || :",
42
- "lint": "eslint . --fix",
42
+ "lint": "eslint . --fix --concurrency=auto --cache",
43
43
  "perf": "node perf/check.js",
44
44
  "prep": "echo 'ready'",
45
45
  "prettier": "prettier",
@@ -66,9 +66,9 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "regex-is-jinja-nunjucks": "^4.0.19",
70
- "regex-is-jsp": "^4.0.19",
71
- "regex-jinja-specific": "^4.0.19"
69
+ "regex-is-jinja-nunjucks": "^4.1.0",
70
+ "regex-is-jsp": "^4.1.0",
71
+ "regex-jinja-specific": "^4.1.0"
72
72
  },
73
73
  "publishConfig": {
74
74
  "registry": "https://registry.npmjs.org/"