step-node-agent 3.23.0 → 3.23.2
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/node_modules/call-bind/.eslintrc +0 -1
- package/node_modules/call-bind/.nycrc +0 -4
- package/node_modules/call-bind/CHANGELOG.md +35 -0
- package/node_modules/call-bind/README.md +63 -1
- package/node_modules/call-bind/index.js +10 -13
- package/node_modules/call-bind/package.json +33 -23
- package/node_modules/call-bind/test/callBound.js +0 -1
- package/node_modules/call-bind/test/index.js +18 -4
- package/node_modules/define-data-property/.eslintrc +24 -0
- package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
- package/node_modules/define-data-property/.nycrc +13 -0
- package/node_modules/define-data-property/CHANGELOG.md +41 -0
- package/node_modules/define-data-property/LICENSE +21 -0
- package/node_modules/define-data-property/README.md +67 -0
- package/node_modules/define-data-property/index.d.ts +3 -0
- package/node_modules/define-data-property/index.d.ts.map +1 -0
- package/node_modules/define-data-property/index.js +68 -0
- package/node_modules/define-data-property/package.json +113 -0
- package/node_modules/define-data-property/test/index.js +392 -0
- package/node_modules/define-data-property/tsconfig.json +59 -0
- package/node_modules/function-bind/.eslintrc +11 -5
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/README.md +25 -27
- package/node_modules/function-bind/implementation.js +44 -12
- package/node_modules/function-bind/package.json +38 -14
- package/node_modules/get-intrinsic/CHANGELOG.md +8 -0
- package/node_modules/get-intrinsic/index.js +1 -1
- package/node_modules/get-intrinsic/package.json +11 -11
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +25 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/index.js +16 -0
- package/node_modules/gopd/package.json +71 -0
- package/node_modules/gopd/test/index.js +35 -0
- package/node_modules/has-property-descriptors/.eslintrc +13 -0
- package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
- package/node_modules/has-property-descriptors/.nycrc +9 -0
- package/node_modules/has-property-descriptors/CHANGELOG.md +27 -0
- package/node_modules/has-property-descriptors/LICENSE +21 -0
- package/node_modules/has-property-descriptors/README.md +43 -0
- package/node_modules/has-property-descriptors/index.js +33 -0
- package/node_modules/has-property-descriptors/package.json +77 -0
- package/node_modules/has-property-descriptors/test/index.js +57 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.d.ts.map +1 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +49 -0
- package/node_modules/is-core-module/CHANGELOG.md +7 -0
- package/node_modules/is-core-module/index.js +2 -2
- package/node_modules/is-core-module/package.json +4 -4
- package/node_modules/object-inspect/CHANGELOG.md +19 -0
- package/node_modules/object-inspect/index.js +8 -0
- package/node_modules/object-inspect/package.json +8 -6
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/punycode/README.md +23 -1
- package/node_modules/punycode/package.json +3 -3
- package/node_modules/punycode/punycode.es6.js +1 -1
- package/node_modules/punycode/punycode.js +1 -1
- package/node_modules/set-function-length/.eslintrc +27 -0
- package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-length/.nycrc +13 -0
- package/node_modules/set-function-length/CHANGELOG.md +41 -0
- package/node_modules/set-function-length/LICENSE +21 -0
- package/node_modules/set-function-length/README.md +56 -0
- package/node_modules/set-function-length/env.js +19 -0
- package/node_modules/set-function-length/index.js +41 -0
- package/node_modules/set-function-length/package.json +84 -0
- package/node_modules/sshpk/bin/sshpk-conv +6 -6
- package/node_modules/sshpk/lib/formats/pkcs8.js +24 -12
- package/node_modules/sshpk/package.json +2 -3
- package/package.json +2 -3
- package/node_modules/function-bind/.editorconfig +0 -20
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -45
- package/node_modules/has/src/index.js +0 -8
- package/node_modules/has/test/index.js +0 -16
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gopd",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
|
+
"prepublishOnly": "safe-publish-latest",
|
|
14
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
|
+
"lint": "eslint --ext=js,mjs .",
|
|
16
|
+
"postlint": "evalmd README.md",
|
|
17
|
+
"pretest": "npm run lint",
|
|
18
|
+
"tests-only": "tape 'test/**/*.js'",
|
|
19
|
+
"test": "npm run tests-only",
|
|
20
|
+
"posttest": "aud --production",
|
|
21
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/ljharb/gopd.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"ecmascript",
|
|
30
|
+
"javascript",
|
|
31
|
+
"getownpropertydescriptor",
|
|
32
|
+
"property",
|
|
33
|
+
"descriptor"
|
|
34
|
+
],
|
|
35
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
36
|
+
"funding": {
|
|
37
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
38
|
+
},
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/ljharb/gopd/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/ljharb/gopd#readme",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"get-intrinsic": "^1.1.3"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@ljharb/eslint-config": "^21.0.0",
|
|
49
|
+
"aud": "^2.0.1",
|
|
50
|
+
"auto-changelog": "^2.4.0",
|
|
51
|
+
"eslint": "=8.8.0",
|
|
52
|
+
"evalmd": "^0.0.19",
|
|
53
|
+
"in-publish": "^2.0.1",
|
|
54
|
+
"npmignore": "^0.3.0",
|
|
55
|
+
"safe-publish-latest": "^2.0.0",
|
|
56
|
+
"tape": "^5.6.1"
|
|
57
|
+
},
|
|
58
|
+
"auto-changelog": {
|
|
59
|
+
"output": "CHANGELOG.md",
|
|
60
|
+
"template": "keepachangelog",
|
|
61
|
+
"unreleased": false,
|
|
62
|
+
"commitLimit": false,
|
|
63
|
+
"backfillLimit": false,
|
|
64
|
+
"hideCredit": true
|
|
65
|
+
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"ignore": [
|
|
68
|
+
".github/workflows"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
var gOPD = require('../');
|
|
5
|
+
|
|
6
|
+
test('gOPD', function (t) {
|
|
7
|
+
t.test('supported', { skip: !gOPD }, function (st) {
|
|
8
|
+
st.equal(typeof gOPD, 'function', 'is a function');
|
|
9
|
+
|
|
10
|
+
var obj = { x: 1 };
|
|
11
|
+
st.ok('x' in obj, 'property exists');
|
|
12
|
+
|
|
13
|
+
var desc = gOPD(obj, 'x');
|
|
14
|
+
st.deepEqual(
|
|
15
|
+
desc,
|
|
16
|
+
{
|
|
17
|
+
configurable: true,
|
|
18
|
+
enumerable: true,
|
|
19
|
+
value: 1,
|
|
20
|
+
writable: true
|
|
21
|
+
},
|
|
22
|
+
'descriptor is as expected'
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
st.end();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
t.test('not supported', { skip: gOPD }, function (st) {
|
|
29
|
+
st.notOk(gOPD, 'is falsy');
|
|
30
|
+
|
|
31
|
+
st.end();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
t.end();
|
|
35
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/has-property-descriptors
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v1.0.1](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.0...v1.0.1) - 2023-10-20
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [meta] use `npmignore` to autogenerate an npmignore file [`5bbf4da`](https://github.com/inspect-js/has-property-descriptors/commit/5bbf4dae1b58950d87bb3af508bee7513e640868)
|
|
13
|
+
- [actions] update rebase action to use reusable workflow [`3a5585b`](https://github.com/inspect-js/has-property-descriptors/commit/3a5585bf74988f71a8f59e67a07d594e62c51fd8)
|
|
14
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`e5c1212`](https://github.com/inspect-js/has-property-descriptors/commit/e5c1212048a8fda549794c47863724ca60b89cae)
|
|
15
|
+
- [Dev Deps] update `aud`, `tape` [`e942917`](https://github.com/inspect-js/has-property-descriptors/commit/e942917b6c2f7c090d5623048989cf20d0834ebf)
|
|
16
|
+
- [Deps] update `get-intrinsic` [`f4a44ec`](https://github.com/inspect-js/has-property-descriptors/commit/f4a44ec6d94146fa6c550d3c15c31a2062c83ef4)
|
|
17
|
+
- [Deps] update `get-intrinsic` [`eeb275b`](https://github.com/inspect-js/has-property-descriptors/commit/eeb275b473e5d72ca843b61ca25cfcb06a5d4300)
|
|
18
|
+
|
|
19
|
+
## v1.0.0 - 2022-04-14
|
|
20
|
+
|
|
21
|
+
### Commits
|
|
22
|
+
|
|
23
|
+
- Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a)
|
|
24
|
+
- Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749)
|
|
25
|
+
- read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767)
|
|
26
|
+
- npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85)
|
|
27
|
+
- Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Inspect JS
|
|
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.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# has-property-descriptors <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![dependency status][deps-svg]][deps-url]
|
|
6
|
+
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
|
7
|
+
[![License][license-image]][license-url]
|
|
8
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
9
|
+
|
|
10
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
11
|
+
|
|
12
|
+
Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
var hasPropertyDescriptors = require('has-property-descriptors');
|
|
18
|
+
var assert = require('assert');
|
|
19
|
+
|
|
20
|
+
assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines
|
|
21
|
+
|
|
22
|
+
// Arrays can not have their length `[[Defined]]` in some engines
|
|
23
|
+
assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Tests
|
|
27
|
+
Simply clone the repo, `npm install`, and run `npm test`
|
|
28
|
+
|
|
29
|
+
[package-url]: https://npmjs.org/package/has-property-descriptors
|
|
30
|
+
[npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg
|
|
31
|
+
[deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg
|
|
32
|
+
[deps-url]: https://david-dm.org/inspect-js/has-property-descriptors
|
|
33
|
+
[dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg
|
|
34
|
+
[dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies
|
|
35
|
+
[npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true
|
|
36
|
+
[license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg
|
|
37
|
+
[license-url]: LICENSE
|
|
38
|
+
[downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg
|
|
39
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors
|
|
40
|
+
[codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg
|
|
41
|
+
[codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/
|
|
42
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors
|
|
43
|
+
[actions-url]: https://github.com/inspect-js/has-property-descriptors/actions
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
+
|
|
5
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
6
|
+
|
|
7
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
8
|
+
if ($defineProperty) {
|
|
9
|
+
try {
|
|
10
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
11
|
+
return true;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
// IE 8 has a broken defineProperty
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
21
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
22
|
+
if (!hasPropertyDescriptors()) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
27
|
+
} catch (e) {
|
|
28
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
module.exports = hasPropertyDescriptors;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "has-property-descriptors",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
|
+
"prepublishOnly": "safe-publish-latest",
|
|
14
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
|
+
"pretest": "npm run lint",
|
|
16
|
+
"prelint": "evalmd README.md",
|
|
17
|
+
"lint": "eslint --ext=js,mjs .",
|
|
18
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
19
|
+
"test": "npm run tests-only",
|
|
20
|
+
"posttest": "aud --production",
|
|
21
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/inspect-js/has-property-descriptors.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"property",
|
|
30
|
+
"descriptors",
|
|
31
|
+
"has",
|
|
32
|
+
"environment",
|
|
33
|
+
"env",
|
|
34
|
+
"defineProperty",
|
|
35
|
+
"getOwnPropertyDescriptor"
|
|
36
|
+
],
|
|
37
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
38
|
+
"funding": {
|
|
39
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
40
|
+
},
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/inspect-js/has-property-descriptors/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/inspect-js/has-property-descriptors#readme",
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
48
|
+
"aud": "^2.0.3",
|
|
49
|
+
"auto-changelog": "^2.4.0",
|
|
50
|
+
"eslint": "=8.8.0",
|
|
51
|
+
"evalmd": "^0.0.19",
|
|
52
|
+
"in-publish": "^2.0.1",
|
|
53
|
+
"npmignore": "^0.3.0",
|
|
54
|
+
"nyc": "^10.3.2",
|
|
55
|
+
"safe-publish-latest": "^2.0.0",
|
|
56
|
+
"tape": "^5.7.2"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"get-intrinsic": "^1.2.2"
|
|
60
|
+
},
|
|
61
|
+
"testling": {
|
|
62
|
+
"files": "test/index.js"
|
|
63
|
+
},
|
|
64
|
+
"auto-changelog": {
|
|
65
|
+
"output": "CHANGELOG.md",
|
|
66
|
+
"template": "keepachangelog",
|
|
67
|
+
"unreleased": false,
|
|
68
|
+
"commitLimit": false,
|
|
69
|
+
"backfillLimit": false,
|
|
70
|
+
"hideCredit": true
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"ignore": [
|
|
74
|
+
".github/workflows"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var hasPropertyDescriptors = require('../');
|
|
6
|
+
|
|
7
|
+
var sentinel = {};
|
|
8
|
+
|
|
9
|
+
test('hasPropertyDescriptors', function (t) {
|
|
10
|
+
t.equal(typeof hasPropertyDescriptors, 'function', 'is a function');
|
|
11
|
+
t.equal(typeof hasPropertyDescriptors.hasArrayLengthDefineBug, 'function', '`hasArrayLengthDefineBug` property is a function');
|
|
12
|
+
|
|
13
|
+
var yes = hasPropertyDescriptors();
|
|
14
|
+
t.test('property descriptors', { skip: !yes }, function (st) {
|
|
15
|
+
var o = { a: sentinel };
|
|
16
|
+
|
|
17
|
+
st.deepEqual(
|
|
18
|
+
Object.getOwnPropertyDescriptor(o, 'a'),
|
|
19
|
+
{
|
|
20
|
+
configurable: true,
|
|
21
|
+
enumerable: true,
|
|
22
|
+
value: sentinel,
|
|
23
|
+
writable: true
|
|
24
|
+
},
|
|
25
|
+
'has expected property descriptor'
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
Object.defineProperty(o, 'a', { enumerable: false, writable: false });
|
|
29
|
+
|
|
30
|
+
st.deepEqual(
|
|
31
|
+
Object.getOwnPropertyDescriptor(o, 'a'),
|
|
32
|
+
{
|
|
33
|
+
configurable: true,
|
|
34
|
+
enumerable: false,
|
|
35
|
+
value: sentinel,
|
|
36
|
+
writable: false
|
|
37
|
+
},
|
|
38
|
+
'has expected property descriptor after [[Define]]'
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
st.end();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
var arrayBug = hasPropertyDescriptors.hasArrayLengthDefineBug();
|
|
45
|
+
t.test('defining array lengths', { skip: !yes || arrayBug }, function (st) {
|
|
46
|
+
var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays
|
|
47
|
+
st.equal(arr.length, 3, 'array starts with length 3');
|
|
48
|
+
|
|
49
|
+
Object.defineProperty(arr, 'length', { value: 5 });
|
|
50
|
+
|
|
51
|
+
st.equal(arr.length, 5, 'array ends with length 5');
|
|
52
|
+
|
|
53
|
+
st.end();
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
t.end();
|
|
57
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/hasown
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with a single custom sponsorship URL
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4)
|
|
13
|
+
- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458)
|
|
14
|
+
- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215)
|
|
15
|
+
|
|
16
|
+
## v1.0.1 - 2023-10-10
|
|
17
|
+
|
|
18
|
+
### Commits
|
|
19
|
+
|
|
20
|
+
- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Jordan Harband and contributors
|
|
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.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# hasown <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![License][license-image]][license-url]
|
|
6
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
7
|
+
|
|
8
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
9
|
+
|
|
10
|
+
A robust, ES3 compatible, "has own property" predicate.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
const assert = require('assert');
|
|
16
|
+
const hasOwn = require('hasown');
|
|
17
|
+
|
|
18
|
+
assert.equal(hasOwn({}, 'toString'), false);
|
|
19
|
+
assert.equal(hasOwn([], 'length'), true);
|
|
20
|
+
assert.equal(hasOwn({ a: 42 }, 'a'), true);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Tests
|
|
24
|
+
Simply clone the repo, `npm install`, and run `npm test`
|
|
25
|
+
|
|
26
|
+
[package-url]: https://npmjs.org/package/hasown
|
|
27
|
+
[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg
|
|
28
|
+
[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg
|
|
29
|
+
[deps-url]: https://david-dm.org/inspect-js/hasOwn
|
|
30
|
+
[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg
|
|
31
|
+
[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies
|
|
32
|
+
[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true
|
|
33
|
+
[license-image]: https://img.shields.io/npm/l/hasown.svg
|
|
34
|
+
[license-url]: LICENSE
|
|
35
|
+
[downloads-image]: https://img.shields.io/npm/dm/hasown.svg
|
|
36
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=hasown
|
|
37
|
+
[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg
|
|
38
|
+
[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/
|
|
39
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn
|
|
40
|
+
[actions-url]: https://github.com/inspect-js/hasOwn/actions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"4BAMe,EAAE,KAAK,WAAW"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hasown",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types",
|
|
12
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
13
|
+
"prepublishOnly": "safe-publish-latest",
|
|
14
|
+
"prelint": "evalmd README.md",
|
|
15
|
+
"lint": "eslint --ext=js,mjs .",
|
|
16
|
+
"postlint": "npm run tsc",
|
|
17
|
+
"preemit-types": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map",
|
|
18
|
+
"emit-types": "npm run tsc -- --noEmit false --emitDeclarationOnly",
|
|
19
|
+
"pretest": "npm run lint",
|
|
20
|
+
"tsc": "tsc -p .",
|
|
21
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
22
|
+
"test": "npm run tests-only",
|
|
23
|
+
"posttest": "aud --production",
|
|
24
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
25
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/inspect-js/hasOwn.git"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"has",
|
|
33
|
+
"hasOwnProperty",
|
|
34
|
+
"hasOwn",
|
|
35
|
+
"has-own",
|
|
36
|
+
"own",
|
|
37
|
+
"has",
|
|
38
|
+
"property",
|
|
39
|
+
"in",
|
|
40
|
+
"javascript",
|
|
41
|
+
"ecmascript"
|
|
42
|
+
],
|
|
43
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/inspect-js/hasOwn/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/inspect-js/hasOwn#readme",
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"function-bind": "^1.1.2"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
54
|
+
"@types/function-bind": "^1.1.9",
|
|
55
|
+
"@types/mock-property": "^1.0.1",
|
|
56
|
+
"@types/tape": "^5.6.3",
|
|
57
|
+
"aud": "^2.0.3",
|
|
58
|
+
"auto-changelog": "^2.4.0",
|
|
59
|
+
"eslint": "=8.8.0",
|
|
60
|
+
"evalmd": "^0.0.19",
|
|
61
|
+
"in-publish": "^2.0.1",
|
|
62
|
+
"mock-property": "^1.0.2",
|
|
63
|
+
"npmignore": "^0.3.0",
|
|
64
|
+
"nyc": "^10.3.2",
|
|
65
|
+
"safe-publish-latest": "^2.0.0",
|
|
66
|
+
"tape": "^5.7.1",
|
|
67
|
+
"typescript": "^5.3.0-dev.20231019"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">= 0.4"
|
|
71
|
+
},
|
|
72
|
+
"testling": {
|
|
73
|
+
"files": "test/index.js"
|
|
74
|
+
},
|
|
75
|
+
"auto-changelog": {
|
|
76
|
+
"output": "CHANGELOG.md",
|
|
77
|
+
"template": "keepachangelog",
|
|
78
|
+
"unreleased": false,
|
|
79
|
+
"commitLimit": false,
|
|
80
|
+
"backfillLimit": false,
|
|
81
|
+
"hideCredit": true
|
|
82
|
+
},
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"ignore": [
|
|
85
|
+
".github/workflows",
|
|
86
|
+
"test",
|
|
87
|
+
"!*.d.ts",
|
|
88
|
+
"!*.d.ts.map"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
}
|