mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 18:06:45 +00:00
Fix.
This commit is contained in:
parent
596a6da241
commit
c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions
21
node_modules/lines-and-columns/LICENSE
generated
vendored
Normal file
21
node_modules/lines-and-columns/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Brian Donovan
|
||||
|
||||
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.
|
29
node_modules/lines-and-columns/README.md
generated
vendored
Normal file
29
node_modules/lines-and-columns/README.md
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
# lines-and-columns
|
||||
|
||||
Maps lines and columns to character offsets and back. This is useful for parsers
|
||||
and other text processors that deal in character ranges but process text with
|
||||
meaningful lines and columns.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install [--save] lines-and-columns
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import LinesAndColumns from 'lines-and-columns';
|
||||
|
||||
const lines = new LinesAndColumns(
|
||||
`table {
|
||||
border: 0
|
||||
}`);
|
||||
|
||||
lines.locationForIndex(9); // { line: 1, column: 1 }
|
||||
lines.indexForLocation({ line: 1, column: 2 }); // 10
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
12
node_modules/lines-and-columns/dist/index.d.ts
generated
vendored
Normal file
12
node_modules/lines-and-columns/dist/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
export declare type SourceLocation = {
|
||||
line: number;
|
||||
column: number;
|
||||
};
|
||||
export default class LinesAndColumns {
|
||||
private string;
|
||||
private offsets;
|
||||
constructor(string: string);
|
||||
locationForIndex(index: number): SourceLocation | null;
|
||||
indexForLocation(location: SourceLocation): number | null;
|
||||
private lengthOfLine(line);
|
||||
}
|
58
node_modules/lines-and-columns/dist/index.js
generated
vendored
Normal file
58
node_modules/lines-and-columns/dist/index.js
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
"use strict";
|
||||
var LF = '\n';
|
||||
var CR = '\r';
|
||||
var LinesAndColumns = (function () {
|
||||
function LinesAndColumns(string) {
|
||||
this.string = string;
|
||||
var offsets = [0];
|
||||
for (var offset = 0; offset < string.length;) {
|
||||
switch (string[offset]) {
|
||||
case LF:
|
||||
offset += LF.length;
|
||||
offsets.push(offset);
|
||||
break;
|
||||
case CR:
|
||||
offset += CR.length;
|
||||
if (string[offset] === LF) {
|
||||
offset += LF.length;
|
||||
}
|
||||
offsets.push(offset);
|
||||
break;
|
||||
default:
|
||||
offset++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.offsets = offsets;
|
||||
}
|
||||
LinesAndColumns.prototype.locationForIndex = function (index) {
|
||||
if (index < 0 || index > this.string.length) {
|
||||
return null;
|
||||
}
|
||||
var line = 0;
|
||||
var offsets = this.offsets;
|
||||
while (offsets[line + 1] <= index) {
|
||||
line++;
|
||||
}
|
||||
var column = index - offsets[line];
|
||||
return { line: line, column: column };
|
||||
};
|
||||
LinesAndColumns.prototype.indexForLocation = function (location) {
|
||||
var line = location.line, column = location.column;
|
||||
if (line < 0 || line >= this.offsets.length) {
|
||||
return null;
|
||||
}
|
||||
if (column < 0 || column > this.lengthOfLine(line)) {
|
||||
return null;
|
||||
}
|
||||
return this.offsets[line] + column;
|
||||
};
|
||||
LinesAndColumns.prototype.lengthOfLine = function (line) {
|
||||
var offset = this.offsets[line];
|
||||
var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1];
|
||||
return nextOffset - offset;
|
||||
};
|
||||
return LinesAndColumns;
|
||||
}());
|
||||
exports.__esModule = true;
|
||||
exports["default"] = LinesAndColumns;
|
56
node_modules/lines-and-columns/dist/index.mjs
generated
vendored
Normal file
56
node_modules/lines-and-columns/dist/index.mjs
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
var LF = '\n';
|
||||
var CR = '\r';
|
||||
var LinesAndColumns = (function () {
|
||||
function LinesAndColumns(string) {
|
||||
this.string = string;
|
||||
var offsets = [0];
|
||||
for (var offset = 0; offset < string.length;) {
|
||||
switch (string[offset]) {
|
||||
case LF:
|
||||
offset += LF.length;
|
||||
offsets.push(offset);
|
||||
break;
|
||||
case CR:
|
||||
offset += CR.length;
|
||||
if (string[offset] === LF) {
|
||||
offset += LF.length;
|
||||
}
|
||||
offsets.push(offset);
|
||||
break;
|
||||
default:
|
||||
offset++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.offsets = offsets;
|
||||
}
|
||||
LinesAndColumns.prototype.locationForIndex = function (index) {
|
||||
if (index < 0 || index > this.string.length) {
|
||||
return null;
|
||||
}
|
||||
var line = 0;
|
||||
var offsets = this.offsets;
|
||||
while (offsets[line + 1] <= index) {
|
||||
line++;
|
||||
}
|
||||
var column = index - offsets[line];
|
||||
return { line: line, column: column };
|
||||
};
|
||||
LinesAndColumns.prototype.indexForLocation = function (location) {
|
||||
var line = location.line, column = location.column;
|
||||
if (line < 0 || line >= this.offsets.length) {
|
||||
return null;
|
||||
}
|
||||
if (column < 0 || column > this.lengthOfLine(line)) {
|
||||
return null;
|
||||
}
|
||||
return this.offsets[line] + column;
|
||||
};
|
||||
LinesAndColumns.prototype.lengthOfLine = function (line) {
|
||||
var offset = this.offsets[line];
|
||||
var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1];
|
||||
return nextOffset - offset;
|
||||
};
|
||||
return LinesAndColumns;
|
||||
}());
|
||||
export default LinesAndColumns;
|
73
node_modules/lines-and-columns/package.json
generated
vendored
Normal file
73
node_modules/lines-and-columns/package.json
generated
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"_from": "lines-and-columns@^1.1.6",
|
||||
"_id": "lines-and-columns@1.1.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
|
||||
"_location": "/lines-and-columns",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "lines-and-columns@^1.1.6",
|
||||
"name": "lines-and-columns",
|
||||
"escapedName": "lines-and-columns",
|
||||
"rawSpec": "^1.1.6",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.6"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/read-pkg/parse-json"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
|
||||
"_shasum": "1c00c743b433cd0a4e80758f7b64a57440d9ff00",
|
||||
"_spec": "lines-and-columns@^1.1.6",
|
||||
"_where": "E:\\github\\setup-java\\node_modules\\read-pkg\\node_modules\\parse-json",
|
||||
"author": {
|
||||
"name": "Brian Donovan",
|
||||
"email": "me@brian-donovan.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eventualbuddha/lines-and-columns/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "Maps lines and columns to character offsets and back.",
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^2.2.34",
|
||||
"@types/node": "^6.0.52",
|
||||
"mocha": "^3.2.0",
|
||||
"semantic-release": "^6.3.2",
|
||||
"ts-node": "^1.7.2",
|
||||
"tslint": "^4.1.1",
|
||||
"typescript": "^2.1.4"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"homepage": "https://github.com/eventualbuddha/lines-and-columns#readme",
|
||||
"keywords": [
|
||||
"lines",
|
||||
"columns",
|
||||
"parser"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"name": "lines-and-columns",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/eventualbuddha/lines-and-columns.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "./script/build",
|
||||
"lint": "tslint --config tslint.json --project tsconfig.json --type-check",
|
||||
"lint-fix": "tslint --config tslint.json --project tsconfig.json --type-check --fix",
|
||||
"prebuild": "rm -rf dist",
|
||||
"prepublish": "npm run lint && npm run build",
|
||||
"pretest": "npm run build",
|
||||
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
|
||||
"test": "mocha"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"version": "1.1.6"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue