Skip to content

Commit

Permalink
Fix line endings in transcribed jsonc-parser license (#56)
Browse files Browse the repository at this point in the history
The license was using DOS line endings, whereas the rest of the file
uses UNIX line endings. This makes it consistent and ensures the comment
is ended on a new line.
  • Loading branch information
sambostock authored Nov 21, 2024
1 parent e5044eb commit 4802ab9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
43 changes: 22 additions & 21 deletions lib/formats/jsonc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
/*
The MIT License (MIT)
Copyright (c) Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.*/
The MIT License (MIT)
Copyright (c) Microsoft
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

// node_modules/jsonc-parser/lib/esm/impl/scanner.js
function createScanner(text, ignoreTrivia = false) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"fixcjs": "fs.writeFileSync('cjs/writeFile.js', fs.readFileSync('cjs/writeFile.js').toString().replace(`(await Promise.resolve().then(function () {\n return _interopRequireWildcard(require('node:fs'));\n})).default`, `require('node:fs')`));fs.writeFileSync('cjs/readFile.js', fs.readFileSync('cjs/readFile.js').toString().replace(`(await Promise.resolve().then(function () {\n return _interopRequireWildcard(require('node:fs'));\n})).default`, `require('node:fs')`))"
},
"scripts": {
"copy:jsonc": "esbuild node_modules/jsonc-parser/lib/esm/main.js --bundle --format=esm --platform=neutral --banner:js=\"/*\n$(cat node_modules/jsonc-parser/LICENSE.md)*/\" --outfile=lib/formats/jsonc.js",
"copy:jsonc": "esbuild node_modules/jsonc-parser/lib/esm/main.js --bundle --format=esm --platform=neutral --banner:js=\"/*\n$(sed 's/\\r$//' node_modules/jsonc-parser/LICENSE.md)\n*/\" --outfile=lib/formats/jsonc.js",
"copy:json5": "cp node_modules/json5/dist/index.mjs lib/formats/json5.js",
"copy:yaml": "cp node_modules/js-yaml/dist/js-yaml.mjs lib/formats/yaml.js",
"copy": "rm -rf lib/formats && mkdir lib/formats && npm run copy:jsonc && npm run copy:json5 && npm run copy:yaml",
Expand Down

0 comments on commit 4802ab9

Please sign in to comment.