detect-templating-language 4.0.7 → 4.0.8

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/README.md CHANGED
@@ -38,16 +38,14 @@ import { detectLang } from "detect-templating-language";
38
38
 
39
39
  // detects Nunjucks
40
40
  assert.deepEqual(
41
- detectLang(`<div>{% if something %}x{% else %}y{% endif %}</div>`),
42
- { name: "Nunjucks" }
41
+ detectLang("<div>{% if something %}x{% else %}y{% endif %}</div>"),
42
+ { name: "Nunjucks" },
43
43
  );
44
44
 
45
45
  // detects JSP (Java Server Pages)
46
46
  assert.deepEqual(
47
- detectLang(
48
- `<div><c:set var="someList" value="\${jspProp.someList}" /></div>`
49
- ),
50
- { name: "JSP" }
47
+ detectLang('<div><c:set var="someList" value="${jspProp.someList}" /></div>'),
48
+ { name: "JSP" },
51
49
  );
52
50
  ```
53
51
 
@@ -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.7
4
+ * @version 4.0.8
5
5
  * @author Roy Revelt, Codsen Ltd
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.7";var d=n;function m(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{m 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.0.8";var d=n;function m(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{m as detectLang,d as version};
@@ -1,17 +1,17 @@
1
1
  /**
2
2
  * @name detect-templating-language
3
3
  * @fileoverview Detects various templating languages present in string
4
- * @version 4.0.7
4
+ * @version 4.0.8
5
5
  * @author Roy Revelt, Codsen Ltd
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 m=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var s in t)i(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l(t))!m.call(e,n)&&n!==s&&i(e,n,{get:()=>t[n],enumerable:!(r=c(t,n))||r.enumerable});return e};var f=e=>g(i({},"__esModule",{value:!0}),e);var y={};d(y,{detectLang:()=>v,version:()=>x});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.7";var x=a;function v(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?(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 c=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var s in t)i(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l(t))!m.call(e,n)&&n!==s&&i(e,n,{get:()=>t[n],enumerable:!(r=c(t,n))||r.enumerable});return e};var f=e=>g(i({},"__esModule",{value:!0}),e);var y={};d(y,{detectLang:()=>v,version:()=>x});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.8";var x=a;function v(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?(p().test(e)?(t="Nunjucks",u().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.5
14
+ * @version 4.0.6
15
15
  * @author Roy Revelt, Codsen Ltd
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/regex-is-jinja-nunjucks/}
@@ -19,7 +19,7 @@
19
19
  /**
20
20
  * @name regex-is-jsp
21
21
  * @fileoverview Regular expression for detecting JSP (Java Server Pages) code
22
- * @version 4.0.5
22
+ * @version 4.0.6
23
23
  * @author Roy Revelt, Codsen Ltd
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/regex-is-jsp/}
@@ -27,7 +27,7 @@
27
27
  /**
28
28
  * @name regex-jinja-specific
29
29
  * @fileoverview Regular expression for detecting Python-specific Jinja code
30
- * @version 4.0.5
30
+ * @version 4.0.6
31
31
  * @author Roy Revelt, Codsen Ltd
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/regex-jinja-specific/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detect-templating-language",
3
- "version": "4.0.7",
3
+ "version": "4.0.8",
4
4
  "description": "Detects various templating languages present in string",
5
5
  "keywords": [
6
6
  "check",
@@ -35,7 +35,7 @@
35
35
  "cjs-on": "exit 0",
36
36
  "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
37
37
  "devtest": "c8 npm run unit && npm run examples && npm run lint",
38
- "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --loglevel 'silent'",
38
+ "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
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 || :",
@@ -43,7 +43,7 @@
43
43
  "perf": "node perf/check.js",
44
44
  "prep": "echo 'ready'",
45
45
  "prettier": "prettier",
46
- "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --loglevel 'silent'",
46
+ "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --log-level 'silent'",
47
47
  "pretest": "npm run lect && npm run build",
48
48
  "test": "npm run devtest",
49
49
  "unit": "uvu test"
@@ -66,8 +66,8 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "regex-is-jinja-nunjucks": "^4.0.5",
70
- "regex-is-jsp": "^4.0.5",
71
- "regex-jinja-specific": "^4.0.5"
69
+ "regex-is-jinja-nunjucks": "^4.0.6",
70
+ "regex-is-jsp": "^4.0.6",
71
+ "regex-jinja-specific": "^4.0.6"
72
72
  }
73
73
  }