Skip to content

Commit 7ff4e5c

Browse files
committed
feat: add support for WAT files
1 parent 9e9d15f commit 7ff4e5c

File tree

11 files changed

+114
-2
lines changed

11 files changed

+114
-2
lines changed

lib/node_modules/@stdlib/_tools/licenses/header-regexp-table/lib/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ var EXT = [
5454
'py',
5555
'R',
5656
'sh',
57+
'ts',
58+
'wat',
5759
'yml',
5860
'default' // Not a language, but serves as a fallback when unable to determine a file type based on filename extension or basename
5961
];
6062

61-
// Leading comment characters: /** (JS, C, C++), /* (CSS), !> (Fortran), # (R, Python, Julia, AWK, bash, GYP), #/ (make, YAML, INI), <!-- (HTML, Markdown)
62-
var RE_LEADING_COMMENT = /^\/\*\*|^\/\*|^!>|^#\/{0,1}|^<!--/;
63+
// Leading comment characters: /** (JS, C, C++), /* (CSS), !> (Fortran), # (R, Python, Julia, AWK, bash, GYP), ;; (WAT), #/ (make, YAML, INI), <!-- (HTML, Markdown)
64+
var RE_LEADING_COMMENT = /^\/\*\*|^\/\*|^!>|^#\/{0,1}|^;;|^<!--/;
6365

6466
// Trailing comment characters: */ (JS, C, C++), */ (CSS), !< (Fortran), #/ (make, YAML, INI), --> (HTML, Markdown)
6567
var RE_TRAILING_COMMENT = /\*\/$|!<$|#\/$|-->$/;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
;; @license Apache-2.0
2+
;;
3+
;; Copyright (c) 2018 The Stdlib Authors.
4+
;;
5+
;; Licensed under the Apache License, Version 2.0 (the "License");
6+
;; you may not use this file except in compliance with the License.
7+
;; You may obtain a copy of the License at
8+
;;
9+
;; http://www.apache.org/licenses/LICENSE-2.0
10+
;;
11+
;; Unless required by applicable law or agreed to in writing, software
12+
;; distributed under the License is distributed on an "AS IS" BASIS,
13+
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
;; See the License for the specific language governing permissions and
15+
;; limitations under the License.
16+
;;
17+
18+
;; beep boop

lib/node_modules/@stdlib/_tools/licenses/header-regexp-table/test/test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ var LANGS = [
8282
'bash',
8383
'text',
8484
'txt',
85+
'wat',
86+
'WAT',
8587
'YAML',
8688
'yaml',
8789
'yml'
@@ -105,6 +107,7 @@ var FIXTURES = {
105107
'file.py.txt': 'python',
106108
'file.r.txt': 'r',
107109
'file.txt.txt': 'txt',
110+
'file.wat.txt': 'wat',
108111
'file.yml.txt': 'yaml'
109112
};
110113

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
;; @license Apache-2.0
2+
;;
3+
;; Copyright (c) 2018 The Stdlib Authors.
4+
;;
5+
;; Licensed under the Apache License, Version 2.0 (the "License");
6+
;; you may not use this file except in compliance with the License.
7+
;; You may obtain a copy of the License at
8+
;;
9+
;; http://www.apache.org/licenses/LICENSE-2.0
10+
;;
11+
;; Unless required by applicable law or agreed to in writing, software
12+
;; distributed under the License is distributed on an "AS IS" BASIS,
13+
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
;; See the License for the specific language governing permissions and
15+
;; limitations under the License.
16+
;;
17+
18+
;; beep boop

lib/node_modules/@stdlib/_tools/licenses/header-regexp/test/test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ var LANGS = [
7474
'bash',
7575
'text',
7676
'txt',
77+
'wat',
78+
'WAT',
7779
'YAML',
7880
'yml'
7981
];
@@ -96,6 +98,7 @@ var FIXTURES = {
9698
'file.py.txt': 'python',
9799
'file.r.txt': 'r',
98100
'file.txt.txt': 'txt',
101+
'file.wat.txt': 'wat',
99102
'file.yml.txt': 'yaml'
100103
};
101104

lib/node_modules/@stdlib/_tools/licenses/header/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ var h = licenseHeader( 'Apache-2.0', 'beepboopbop' );
123123

124124
- `Apache-2.0`
125125
- `BSD-3-Clause`
126+
- `MIT`
126127

127128
</section>
128129

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
;; @license Apache-2.0
2+
;;
3+
;; Copyright (c) {{YEAR}} {{COPYRIGHT_OWNER}}.
4+
;;
5+
;; Licensed under the Apache License, Version 2.0 (the "License");
6+
;; you may not use this file except in compliance with the License.
7+
;; You may obtain a copy of the License at
8+
;;
9+
;; http://www.apache.org/licenses/LICENSE-2.0
10+
;;
11+
;; Unless required by applicable law or agreed to in writing, software
12+
;; distributed under the License is distributed on an "AS IS" BASIS,
13+
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
;; See the License for the specific language governing permissions and
15+
;; limitations under the License.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
;; @license BSD-3-Clause
2+
;;
3+
;; Copyright (c) {{YEAR}} {{COPYRIGHT_OWNER}}.
4+
;;
5+
;; Redistribution and use in source and binary forms, with or without
6+
;; modification, are permitted provided that the following conditions are met:
7+
;;
8+
;; 1. Redistributions of source code must retain the above copyright notice, this
9+
;; list of conditions and the following disclaimer.
10+
;;
11+
;; 2. Redistributions in binary form must reproduce the above copyright notice,
12+
;; this list of conditions and the following disclaimer in the documentation
13+
;; and/or other materials provided with the distribution.
14+
;;
15+
;; 3. Neither the name of the copyright holder nor the names of its
16+
;; contributors may be used to endorse or promote products derived from
17+
;; this software without specific prior written permission.
18+
;;
19+
;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
;; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
;; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
;; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
;; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
;; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
;; @license MIT
2+
;;
3+
;; Copyright (c) {{YEAR}} {{COPYRIGHT_OWNER}}.
4+
;;
5+
;; Permission is hereby granted, free of charge, to any person obtaining a copy
6+
;; of this software and associated documentation files (the "Software"), to deal
7+
;; in the Software without restriction, including without limitation the rights
8+
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
;; copies of the Software, and to permit persons to whom the Software is
10+
;; furnished to do so, subject to the following conditions:
11+
;;
12+
;; The above copyright notice and this permission notice shall be included in all
13+
;; copies or substantial portions of the Software.
14+
;;
15+
;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
;; SOFTWARE.

lib/node_modules/@stdlib/_tools/licenses/header/lib/type2ext.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"tsx": "ts",
3636
"typescript": "ts",
3737
"txt": "txt",
38+
"wat": "wat",
3839
"yaml": "yml",
3940
"yml": "yml"
4041
}

0 commit comments

Comments
 (0)