-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add deprecation warnings to access commands
- Loading branch information
Showing
379 changed files
with
26,729 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Type definitions for JSON5 | ||
// Project: http://json5.org/ | ||
// Definitions by: Jason Swearingen <https://jasonswearingen.github.io> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
|
||
|
||
//commonjs loader | ||
|
||
/** | ||
* The following is the exact list of additions to JSON's syntax introduced by JSON5. All of these are optional, and all of these come from ES5. | ||
Objects | ||
Object keys can be unquoted if they're valid identifiers. Yes, even reserved keywords (like default) are valid unquoted keys in ES5 [§11.1.5, §7.6]. (More info) | ||
(TODO: Unicode characters and escape sequences aren’t yet supported in this implementation.) | ||
Objects can have trailing commas. | ||
Arrays | ||
Arrays can have trailing commas. | ||
Strings | ||
Strings can be single-quoted. | ||
Strings can be split across multiple lines; just prefix each newline with a backslash. [ES5 §7.8.4] | ||
Numbers | ||
Numbers can be hexadecimal (base 16). | ||
Numbers can begin or end with a (leading or trailing) decimal point. | ||
Numbers can include Infinity, -Infinity, NaN, and -NaN. | ||
Numbers can begin with an explicit plus sign. | ||
Comments | ||
Both inline (single-line) and block (multi-line) comments are allowed. | ||
*/ | ||
declare var json5: JSON; | ||
export = json5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "@types/json5", | ||
"version": "0.0.29", | ||
"description": "TypeScript definitions for JSON5", | ||
"license": "MIT", | ||
"author": "Jason Swearingen <https://jasonswearingen.github.io>", | ||
"main": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "1ed77f2bfd59d290798abf89db281c36565f4a78d97d4e9caab25319d54c6331" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"authors": "Jason Swearingen <https://jasonswearingen.github.io>", | ||
"definitionFilename": "index.d.ts", | ||
"libraryDependencies": [], | ||
"moduleDependencies": [], | ||
"libraryMajorVersion": "0", | ||
"libraryMinorVersion": "0", | ||
"libraryName": "JSON5", | ||
"typingsPackageName": "json5", | ||
"projectName": "http://json5.org/", | ||
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", | ||
"sourceBranch": "types-2.0", | ||
"kind": "ProperModule", | ||
"globals": [ | ||
"json5" | ||
], | ||
"declaredModules": [ | ||
"json5" | ||
], | ||
"files": [ | ||
"index.d.ts" | ||
], | ||
"hasPackageJson": false, | ||
"contentHash": "1ed77f2bfd59d290798abf89db281c36565f4a78d97d4e9caab25319d54c6331" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (C) 2015 Jordan Harband | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
require('./shim')(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
'use strict'; | ||
|
||
var ToIntegerOrInfinity = require('es-abstract/2021/ToIntegerOrInfinity'); | ||
var ToLength = require('es-abstract/2021/ToLength'); | ||
var ToObject = require('es-abstract/2021/ToObject'); | ||
var SameValueZero = require('es-abstract/2021/SameValueZero'); | ||
var $isNaN = require('es-abstract/helpers/isNaN'); | ||
var $isFinite = require('es-abstract/helpers/isFinite'); | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var callBound = require('call-bind/callBound'); | ||
var isString = require('is-string'); | ||
|
||
var $charAt = callBound('String.prototype.charAt'); | ||
var $indexOf = GetIntrinsic('%Array.prototype.indexOf%'); // TODO: use callBind.apply without breaking IE 8 | ||
var $max = GetIntrinsic('%Math.max%'); | ||
|
||
module.exports = function includes(searchElement) { | ||
var fromIndex = arguments.length > 1 ? ToIntegerOrInfinity(arguments[1]) : 0; | ||
if ($indexOf && !$isNaN(searchElement) && $isFinite(fromIndex) && typeof searchElement !== 'undefined') { | ||
return $indexOf.apply(this, arguments) > -1; | ||
} | ||
|
||
var O = ToObject(this); | ||
var length = ToLength(O.length); | ||
if (length === 0) { | ||
return false; | ||
} | ||
var k = fromIndex >= 0 ? fromIndex : $max(0, length + fromIndex); | ||
while (k < length) { | ||
if (SameValueZero(searchElement, isString(O) ? $charAt(O, k) : O[k])) { | ||
return true; | ||
} | ||
k += 1; | ||
} | ||
return false; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
|
||
var define = require('define-properties'); | ||
var RequireObjectCoercible = require('es-abstract/2021/RequireObjectCoercible'); | ||
var callBind = require('call-bind'); | ||
var callBound = require('call-bind/callBound'); | ||
|
||
var implementation = require('./implementation'); | ||
var getPolyfill = require('./polyfill'); | ||
var polyfill = callBind.apply(getPolyfill()); | ||
var shim = require('./shim'); | ||
|
||
var $slice = callBound('Array.prototype.slice'); | ||
|
||
/* eslint-disable no-unused-vars */ | ||
var boundShim = function includes(array, searchElement) { | ||
/* eslint-enable no-unused-vars */ | ||
RequireObjectCoercible(array); | ||
return polyfill(array, $slice(arguments, 1)); | ||
}; | ||
define(boundShim, { | ||
getPolyfill: getPolyfill, | ||
implementation: implementation, | ||
shim: shim | ||
}); | ||
|
||
module.exports = boundShim; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"name": "array-includes", | ||
"version": "3.1.5", | ||
"author": { | ||
"name": "Jordan Harband", | ||
"email": "[email protected]", | ||
"url": "http://ljharb.codes" | ||
}, | ||
"funding": { | ||
"url": "https://github.com/sponsors/ljharb" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Jordan Harband", | ||
"email": "[email protected]", | ||
"url": "http://ljharb.codes" | ||
} | ||
], | ||
"description": "An ES7/ES2016 spec-compliant `Array.prototype.includes` shim/polyfill/replacement that works as far down as ES3.", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"scripts": { | ||
"prepublish": "not-in-publish || npm run prepublishOnly", | ||
"prepublishOnly": "safe-publish-latest", | ||
"pretest": "npm run --silent lint", | ||
"test": "npm run --silent tests-only", | ||
"posttest": "aud --production", | ||
"tests-only": "nyc tape 'test/**/*.js'", | ||
"prelint": "evalmd README.md", | ||
"lint": "eslint --ext=js,mjs .", | ||
"postlint": "es-shim-api --bound" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/es-shims/array-includes.git" | ||
}, | ||
"keywords": [ | ||
"Array.prototype.includes", | ||
"includes", | ||
"array", | ||
"ES7", | ||
"shim", | ||
"polyfill", | ||
"contains", | ||
"Array.prototype.contains", | ||
"es-shim API" | ||
], | ||
"dependencies": { | ||
"call-bind": "^1.0.2", | ||
"define-properties": "^1.1.4", | ||
"es-abstract": "^1.19.5", | ||
"get-intrinsic": "^1.1.1", | ||
"is-string": "^1.0.7" | ||
}, | ||
"devDependencies": { | ||
"@es-shims/api": "^2.2.3", | ||
"@ljharb/eslint-config": "^21.0.0", | ||
"aud": "^2.0.0", | ||
"eslint": "=8.8.0", | ||
"evalmd": "^0.0.19", | ||
"foreach": "^2.0.5", | ||
"function-bind": "^1.1.1", | ||
"functions-have-names": "^1.2.3", | ||
"has-strict-mode": "^1.0.1", | ||
"indexof": "^0.0.1", | ||
"nyc": "^10.3.2", | ||
"safe-publish-latest": "^2.0.0", | ||
"tape": "^5.5.3" | ||
}, | ||
"testling": { | ||
"files": [ | ||
"test/index.js", | ||
"test/implementation.js", | ||
"test/shimmed.js" | ||
], | ||
"browsers": [ | ||
"iexplore/6.0..latest", | ||
"firefox/3.0..6.0", | ||
"firefox/15.0..latest", | ||
"firefox/nightly", | ||
"chrome/4.0..10.0", | ||
"chrome/20.0..latest", | ||
"chrome/canary", | ||
"opera/10.0..latest", | ||
"opera/next", | ||
"safari/4.0..latest", | ||
"ipad/6.0..latest", | ||
"iphone/6.0..latest", | ||
"android-browser/4.2" | ||
] | ||
}, | ||
"engines": { | ||
"node": ">= 0.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
'use strict'; | ||
|
||
var implementation = require('./implementation'); | ||
|
||
module.exports = function getPolyfill() { | ||
if ( | ||
Array.prototype.includes | ||
&& Array(1).includes(undefined) // https://bugzilla.mozilla.org/show_bug.cgi?id=1767541 | ||
) { | ||
return Array.prototype.includes; | ||
} | ||
return implementation; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
var define = require('define-properties'); | ||
var getPolyfill = require('./polyfill'); | ||
|
||
module.exports = function shimArrayPrototypeIncludes() { | ||
var polyfill = getPolyfill(); | ||
define( | ||
Array.prototype, | ||
{ includes: polyfill }, | ||
{ includes: function () { return Array.prototype.includes !== polyfill; } } | ||
); | ||
return polyfill; | ||
}; |
Oops, something went wrong.