projen 0.76.0 → 0.76.1

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.
Files changed (160) hide show
  1. package/.jsii +2 -2
  2. package/lib/awscdk/auto-discover.js +5 -5
  3. package/lib/awscdk/awscdk-app-java.js +1 -1
  4. package/lib/awscdk/awscdk-app-py.js +1 -1
  5. package/lib/awscdk/awscdk-app-ts.js +1 -1
  6. package/lib/awscdk/awscdk-construct.js +2 -2
  7. package/lib/awscdk/awscdk-deps-java.js +1 -1
  8. package/lib/awscdk/awscdk-deps-js.js +1 -1
  9. package/lib/awscdk/awscdk-deps-py.js +1 -1
  10. package/lib/awscdk/awscdk-deps.js +1 -1
  11. package/lib/awscdk/cdk-config.js +1 -1
  12. package/lib/awscdk/cdk-tasks.js +1 -1
  13. package/lib/awscdk/integration-test.js +1 -1
  14. package/lib/awscdk/lambda-extension.js +1 -1
  15. package/lib/awscdk/lambda-function.js +2 -2
  16. package/lib/build/build-workflow.js +1 -1
  17. package/lib/cdk/auto-discover-base.js +2 -2
  18. package/lib/cdk/construct-lib.js +1 -1
  19. package/lib/cdk/integration-test-base.js +1 -1
  20. package/lib/cdk/jsii-docgen.js +1 -1
  21. package/lib/cdk/jsii-project.js +1 -1
  22. package/lib/cdk8s/auto-discover.js +2 -2
  23. package/lib/cdk8s/cdk8s-app-py.js +1 -1
  24. package/lib/cdk8s/cdk8s-app-ts.js +1 -1
  25. package/lib/cdk8s/cdk8s-construct.js +1 -1
  26. package/lib/cdk8s/cdk8s-deps-py.js +1 -1
  27. package/lib/cdk8s/cdk8s-deps.js +1 -1
  28. package/lib/cdk8s/integration-test.js +1 -1
  29. package/lib/cdktf/cdktf-construct.js +1 -1
  30. package/lib/circleci/circleci.js +1 -1
  31. package/lib/component.js +1 -1
  32. package/lib/dependencies.js +1 -1
  33. package/lib/dev-env.js +1 -1
  34. package/lib/docker-compose/docker-compose-service.js +1 -1
  35. package/lib/docker-compose/docker-compose.js +1 -1
  36. package/lib/file.js +1 -1
  37. package/lib/gitattributes.js +1 -1
  38. package/lib/github/actions-provider.js +1 -1
  39. package/lib/github/auto-approve.js +1 -1
  40. package/lib/github/auto-merge.js +1 -1
  41. package/lib/github/dependabot.js +1 -1
  42. package/lib/github/github-credentials.js +1 -1
  43. package/lib/github/github-project.js +1 -1
  44. package/lib/github/github.js +1 -1
  45. package/lib/github/mergify.js +1 -1
  46. package/lib/github/pr-template.js +1 -1
  47. package/lib/github/pull-request-lint.js +1 -1
  48. package/lib/github/stale.js +1 -1
  49. package/lib/github/task-workflow.js +1 -1
  50. package/lib/github/workflow-actions.js +1 -1
  51. package/lib/github/workflow-jobs.js +1 -1
  52. package/lib/github/workflows.js +1 -1
  53. package/lib/gitlab/configuration.js +1 -1
  54. package/lib/gitlab/gitlab-configuration.js +1 -1
  55. package/lib/gitlab/nested-configuration.js +1 -1
  56. package/lib/gitpod.js +1 -1
  57. package/lib/ignore-file.js +1 -1
  58. package/lib/ini.js +1 -1
  59. package/lib/java/java-project.js +1 -1
  60. package/lib/java/junit.js +1 -1
  61. package/lib/java/maven-compile.js +1 -1
  62. package/lib/java/maven-packaging.js +1 -1
  63. package/lib/java/maven-sample.js +1 -1
  64. package/lib/java/pom.js +1 -1
  65. package/lib/java/projenrc.js +1 -1
  66. package/lib/javascript/bundler.js +1 -1
  67. package/lib/javascript/eslint.js +1 -1
  68. package/lib/javascript/jest.js +4 -4
  69. package/lib/javascript/node-package.js +1 -1
  70. package/lib/javascript/node-project.js +1 -1
  71. package/lib/javascript/npm-config.js +1 -1
  72. package/lib/javascript/prettier.js +1 -1
  73. package/lib/javascript/projenrc.js +1 -1
  74. package/lib/javascript/typescript-config.js +2 -2
  75. package/lib/javascript/upgrade-dependencies.js +2 -2
  76. package/lib/json-patch.js +1 -1
  77. package/lib/json.js +1 -1
  78. package/lib/license.js +1 -1
  79. package/lib/logger.js +1 -1
  80. package/lib/makefile.js +1 -1
  81. package/lib/object-file.js +1 -1
  82. package/lib/project-build.js +1 -1
  83. package/lib/project.js +1 -1
  84. package/lib/projects.js +1 -1
  85. package/lib/projenrc-json.js +2 -2
  86. package/lib/projenrc.js +1 -1
  87. package/lib/python/pip.js +1 -1
  88. package/lib/python/poetry.js +2 -2
  89. package/lib/python/projenrc.js +1 -1
  90. package/lib/python/pytest-sample.js +1 -1
  91. package/lib/python/pytest.js +1 -1
  92. package/lib/python/python-project.js +1 -1
  93. package/lib/python/python-sample.js +1 -1
  94. package/lib/python/requirements-file.js +1 -1
  95. package/lib/python/setuppy.js +1 -1
  96. package/lib/python/setuptools.js +1 -1
  97. package/lib/python/venv.js +1 -1
  98. package/lib/readme.js +1 -1
  99. package/lib/release/publisher.js +1 -1
  100. package/lib/release/release-trigger.js +1 -1
  101. package/lib/release/release.js +1 -1
  102. package/lib/renovatebot.js +1 -1
  103. package/lib/run-task.js +0 -1894
  104. package/lib/sample-file.js +2 -2
  105. package/lib/semver.js +1 -1
  106. package/lib/source-code.js +1 -1
  107. package/lib/task-runtime.js +1 -1
  108. package/lib/task.js +1 -1
  109. package/lib/tasks.js +1 -1
  110. package/lib/testing.js +1 -1
  111. package/lib/textfile.js +1 -1
  112. package/lib/toml.js +1 -1
  113. package/lib/typescript/projenrc-ts.js +1 -1
  114. package/lib/typescript/projenrc.js +1 -1
  115. package/lib/typescript/typescript-typedoc.js +1 -1
  116. package/lib/typescript/typescript.js +3 -3
  117. package/lib/version.js +2 -2
  118. package/lib/vscode/devcontainer.js +1 -1
  119. package/lib/vscode/extensions.js +1 -1
  120. package/lib/vscode/launch-config.js +1 -1
  121. package/lib/vscode/settings.js +1 -1
  122. package/lib/vscode/vscode.js +1 -1
  123. package/lib/web/next.js +3 -3
  124. package/lib/web/postcss.js +1 -1
  125. package/lib/web/react.js +4 -4
  126. package/lib/web/tailwind.js +1 -1
  127. package/lib/xmlfile.js +1 -1
  128. package/lib/yaml.js +1 -1
  129. package/node_modules/function-bind/.eslintrc +21 -0
  130. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  131. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  132. package/node_modules/function-bind/.nycrc +13 -0
  133. package/node_modules/function-bind/CHANGELOG.md +136 -0
  134. package/node_modules/function-bind/LICENSE +20 -0
  135. package/node_modules/function-bind/README.md +46 -0
  136. package/node_modules/function-bind/implementation.js +84 -0
  137. package/node_modules/function-bind/index.js +5 -0
  138. package/node_modules/function-bind/package.json +87 -0
  139. package/node_modules/function-bind/test/.eslintrc +9 -0
  140. package/node_modules/function-bind/test/index.js +252 -0
  141. package/node_modules/hasown/.eslintrc +5 -0
  142. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  143. package/node_modules/hasown/.nycrc +13 -0
  144. package/node_modules/hasown/CHANGELOG.md +20 -0
  145. package/node_modules/hasown/LICENSE +21 -0
  146. package/node_modules/hasown/README.md +40 -0
  147. package/node_modules/hasown/index.d.ts +3 -0
  148. package/node_modules/hasown/index.d.ts.map +1 -0
  149. package/node_modules/hasown/index.js +8 -0
  150. package/node_modules/hasown/package.json +91 -0
  151. package/node_modules/hasown/tsconfig.json +49 -0
  152. package/node_modules/is-core-module/CHANGELOG.md +7 -0
  153. package/node_modules/is-core-module/index.js +2 -2
  154. package/node_modules/is-core-module/package.json +4 -4
  155. package/package.json +1 -1
  156. package/node_modules/has/LICENSE-MIT +0 -22
  157. package/node_modules/has/README.md +0 -18
  158. package/node_modules/has/package.json +0 -45
  159. package/node_modules/has/src/index.js +0 -8
  160. package/node_modules/has/test/index.js +0 -16
@@ -0,0 +1,252 @@
1
+ // jscs:disable requireUseStrict
2
+
3
+ var test = require('tape');
4
+
5
+ var functionBind = require('../implementation');
6
+ var getCurrentContext = function () { return this; };
7
+
8
+ test('functionBind is a function', function (t) {
9
+ t.equal(typeof functionBind, 'function');
10
+ t.end();
11
+ });
12
+
13
+ test('non-functions', function (t) {
14
+ var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g];
15
+ t.plan(nonFunctions.length);
16
+ for (var i = 0; i < nonFunctions.length; ++i) {
17
+ try { functionBind.call(nonFunctions[i]); } catch (ex) {
18
+ t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i]));
19
+ }
20
+ }
21
+ t.end();
22
+ });
23
+
24
+ test('without a context', function (t) {
25
+ t.test('binds properly', function (st) {
26
+ var args, context;
27
+ var namespace = {
28
+ func: functionBind.call(function () {
29
+ args = Array.prototype.slice.call(arguments);
30
+ context = this;
31
+ })
32
+ };
33
+ namespace.func(1, 2, 3);
34
+ st.deepEqual(args, [1, 2, 3]);
35
+ st.equal(context, getCurrentContext.call());
36
+ st.end();
37
+ });
38
+
39
+ t.test('binds properly, and still supplies bound arguments', function (st) {
40
+ var args, context;
41
+ var namespace = {
42
+ func: functionBind.call(function () {
43
+ args = Array.prototype.slice.call(arguments);
44
+ context = this;
45
+ }, undefined, 1, 2, 3)
46
+ };
47
+ namespace.func(4, 5, 6);
48
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6]);
49
+ st.equal(context, getCurrentContext.call());
50
+ st.end();
51
+ });
52
+
53
+ t.test('returns properly', function (st) {
54
+ var args;
55
+ var namespace = {
56
+ func: functionBind.call(function () {
57
+ args = Array.prototype.slice.call(arguments);
58
+ return this;
59
+ }, null)
60
+ };
61
+ var context = namespace.func(1, 2, 3);
62
+ st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
63
+ st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
64
+ st.end();
65
+ });
66
+
67
+ t.test('returns properly with bound arguments', function (st) {
68
+ var args;
69
+ var namespace = {
70
+ func: functionBind.call(function () {
71
+ args = Array.prototype.slice.call(arguments);
72
+ return this;
73
+ }, null, 1, 2, 3)
74
+ };
75
+ var context = namespace.func(4, 5, 6);
76
+ st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
77
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
78
+ st.end();
79
+ });
80
+
81
+ t.test('called as a constructor', function (st) {
82
+ var thunkify = function (value) {
83
+ return function () { return value; };
84
+ };
85
+ st.test('returns object value', function (sst) {
86
+ var expectedReturnValue = [1, 2, 3];
87
+ var Constructor = functionBind.call(thunkify(expectedReturnValue), null);
88
+ var result = new Constructor();
89
+ sst.equal(result, expectedReturnValue);
90
+ sst.end();
91
+ });
92
+
93
+ st.test('does not return primitive value', function (sst) {
94
+ var Constructor = functionBind.call(thunkify(42), null);
95
+ var result = new Constructor();
96
+ sst.notEqual(result, 42);
97
+ sst.end();
98
+ });
99
+
100
+ st.test('object from bound constructor is instance of original and bound constructor', function (sst) {
101
+ var A = function (x) {
102
+ this.name = x || 'A';
103
+ };
104
+ var B = functionBind.call(A, null, 'B');
105
+
106
+ var result = new B();
107
+ sst.ok(result instanceof B, 'result is instance of bound constructor');
108
+ sst.ok(result instanceof A, 'result is instance of original constructor');
109
+ sst.end();
110
+ });
111
+
112
+ st.end();
113
+ });
114
+
115
+ t.end();
116
+ });
117
+
118
+ test('with a context', function (t) {
119
+ t.test('with no bound arguments', function (st) {
120
+ var args, context;
121
+ var boundContext = {};
122
+ var namespace = {
123
+ func: functionBind.call(function () {
124
+ args = Array.prototype.slice.call(arguments);
125
+ context = this;
126
+ }, boundContext)
127
+ };
128
+ namespace.func(1, 2, 3);
129
+ st.equal(context, boundContext, 'binds a context properly');
130
+ st.deepEqual(args, [1, 2, 3], 'supplies passed arguments');
131
+ st.end();
132
+ });
133
+
134
+ t.test('with bound arguments', function (st) {
135
+ var args, context;
136
+ var boundContext = {};
137
+ var namespace = {
138
+ func: functionBind.call(function () {
139
+ args = Array.prototype.slice.call(arguments);
140
+ context = this;
141
+ }, boundContext, 1, 2, 3)
142
+ };
143
+ namespace.func(4, 5, 6);
144
+ st.equal(context, boundContext, 'binds a context properly');
145
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments');
146
+ st.end();
147
+ });
148
+
149
+ t.test('returns properly', function (st) {
150
+ var boundContext = {};
151
+ var args;
152
+ var namespace = {
153
+ func: functionBind.call(function () {
154
+ args = Array.prototype.slice.call(arguments);
155
+ return this;
156
+ }, boundContext)
157
+ };
158
+ var context = namespace.func(1, 2, 3);
159
+ st.equal(context, boundContext, 'returned context is bound context');
160
+ st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
161
+ st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
162
+ st.end();
163
+ });
164
+
165
+ t.test('returns properly with bound arguments', function (st) {
166
+ var boundContext = {};
167
+ var args;
168
+ var namespace = {
169
+ func: functionBind.call(function () {
170
+ args = Array.prototype.slice.call(arguments);
171
+ return this;
172
+ }, boundContext, 1, 2, 3)
173
+ };
174
+ var context = namespace.func(4, 5, 6);
175
+ st.equal(context, boundContext, 'returned context is bound context');
176
+ st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
177
+ st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
178
+ st.end();
179
+ });
180
+
181
+ t.test('passes the correct arguments when called as a constructor', function (st) {
182
+ var expected = { name: 'Correct' };
183
+ var namespace = {
184
+ Func: functionBind.call(function (arg) {
185
+ return arg;
186
+ }, { name: 'Incorrect' })
187
+ };
188
+ var returned = new namespace.Func(expected);
189
+ st.equal(returned, expected, 'returns the right arg when called as a constructor');
190
+ st.end();
191
+ });
192
+
193
+ t.test('has the new instance\'s context when called as a constructor', function (st) {
194
+ var actualContext;
195
+ var expectedContext = { foo: 'bar' };
196
+ var namespace = {
197
+ Func: functionBind.call(function () {
198
+ actualContext = this;
199
+ }, expectedContext)
200
+ };
201
+ var result = new namespace.Func();
202
+ st.equal(result instanceof namespace.Func, true);
203
+ st.notEqual(actualContext, expectedContext);
204
+ st.end();
205
+ });
206
+
207
+ t.end();
208
+ });
209
+
210
+ test('bound function length', function (t) {
211
+ t.test('sets a correct length without thisArg', function (st) {
212
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; });
213
+ st.equal(subject.length, 3);
214
+ st.equal(subject(1, 2, 3), 6);
215
+ st.end();
216
+ });
217
+
218
+ t.test('sets a correct length with thisArg', function (st) {
219
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {});
220
+ st.equal(subject.length, 3);
221
+ st.equal(subject(1, 2, 3), 6);
222
+ st.end();
223
+ });
224
+
225
+ t.test('sets a correct length without thisArg and first argument', function (st) {
226
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1);
227
+ st.equal(subject.length, 2);
228
+ st.equal(subject(2, 3), 6);
229
+ st.end();
230
+ });
231
+
232
+ t.test('sets a correct length with thisArg and first argument', function (st) {
233
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1);
234
+ st.equal(subject.length, 2);
235
+ st.equal(subject(2, 3), 6);
236
+ st.end();
237
+ });
238
+
239
+ t.test('sets a correct length without thisArg and too many arguments', function (st) {
240
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4);
241
+ st.equal(subject.length, 0);
242
+ st.equal(subject(), 6);
243
+ st.end();
244
+ });
245
+
246
+ t.test('sets a correct length with thisArg and too many arguments', function (st) {
247
+ var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4);
248
+ st.equal(subject.length, 0);
249
+ st.equal(subject(), 6);
250
+ st.end();
251
+ });
252
+ });
@@ -0,0 +1,5 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+ }
@@ -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,13 @@
1
+ {
2
+ "all": true,
3
+ "check-coverage": false,
4
+ "reporter": ["text-summary", "text", "html", "json"],
5
+ "lines": 86,
6
+ "statements": 85.93,
7
+ "functions": 82.43,
8
+ "branches": 76.06,
9
+ "exclude": [
10
+ "coverage",
11
+ "test"
12
+ ]
13
+ }
@@ -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,3 @@
1
+ declare const _exports: (o: {}, p: PropertyKey) => p is never;
2
+ export = _exports;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"4BAMe,EAAE,KAAK,WAAW"}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var call = Function.prototype.call;
4
+ var $hasOwn = Object.prototype.hasOwnProperty;
5
+ var bind = require('function-bind');
6
+
7
+ /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
8
+ module.exports = bind.call(call, $hasOwn);
@@ -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
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+
7
+ /* Language and Environment */
8
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
9
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
10
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
11
+ "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
12
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
13
+
14
+ /* Modules */
15
+ "module": "commonjs", /* Specify what module code is generated. */
16
+ // "rootDir": "./", /* Specify the root folder within your source files. */
17
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
18
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
19
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
20
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
21
+ "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
22
+ "resolveJsonModule": true, /* Enable importing .json files. */
23
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
24
+
25
+ /* JavaScript Support */
26
+ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
27
+ "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
28
+ "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
29
+
30
+ /* Emit */
31
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
32
+ "declarationMap": true, /* Create sourcemaps for d.ts files. */
33
+ "noEmit": true, /* Disable emitting files from a compilation. */
34
+
35
+ /* Interop Constraints */
36
+ "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
37
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
38
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
39
+
40
+ /* Type Checking */
41
+ "strict": true, /* Enable all strict type-checking options. */
42
+
43
+ /* Completeness */
44
+ //"skipLibCheck": true /* Skip type checking all .d.ts files. */
45
+ },
46
+ "exclude": [
47
+ "coverage"
48
+ ]
49
+ }
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v2.13.1](https://github.com/inspect-js/is-core-module/compare/v2.13.0...v2.13.1) - 2023-10-20
9
+
10
+ ### Commits
11
+
12
+ - [Refactor] use `hasown` instead of `has` [`0e52096`](https://github.com/inspect-js/is-core-module/commit/0e520968b0a725276b67420ab4b877486b243ae0)
13
+ - [Dev Deps] update `mock-property`, `tape` [`8736b35`](https://github.com/inspect-js/is-core-module/commit/8736b35464d0f297b55da2c6b30deee04b8303c5)
14
+
8
15
  ## [v2.13.0](https://github.com/inspect-js/is-core-module/compare/v2.12.1...v2.13.0) - 2023-08-05
9
16
 
10
17
  ### Commits
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var has = require('has');
3
+ var hasOwn = require('hasown');
4
4
 
5
5
  function specifierIncluded(current, specifier) {
6
6
  var nodeParts = current.split('.');
@@ -65,5 +65,5 @@ function versionIncluded(nodeVersion, specifierValue) {
65
65
  var data = require('./core.json');
66
66
 
67
67
  module.exports = function isCore(x, nodeVersion) {
68
- return has(data, x) && versionIncluded(nodeVersion, data[x]);
68
+ return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
69
69
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-core-module",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "Is this specifier a node.js core module?",
5
5
  "main": "index.js",
6
6
  "sideEffects": false,
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "homepage": "https://github.com/inspect-js/is-core-module",
44
44
  "dependencies": {
45
- "has": "^1.0.3"
45
+ "hasown": "^2.0.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@ljharb/eslint-config": "^21.1.0",
@@ -50,12 +50,12 @@
50
50
  "auto-changelog": "^2.4.0",
51
51
  "eslint": "=8.8.0",
52
52
  "in-publish": "^2.0.1",
53
- "mock-property": "^1.0.0",
53
+ "mock-property": "^1.0.2",
54
54
  "npmignore": "^0.3.0",
55
55
  "nyc": "^10.3.2",
56
56
  "safe-publish-latest": "^2.0.0",
57
57
  "semver": "^6.3.1",
58
- "tape": "^5.6.6"
58
+ "tape": "^5.7.1"
59
59
  },
60
60
  "auto-changelog": {
61
61
  "output": "CHANGELOG.md",
package/package.json CHANGED
@@ -121,7 +121,7 @@
121
121
  },
122
122
  "main": "lib/index.js",
123
123
  "license": "Apache-2.0",
124
- "version": "0.76.0",
124
+ "version": "0.76.1",
125
125
  "jest": {
126
126
  "maxWorkers": "50%",
127
127
  "testMatch": [
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 Thiago de Arruda
2
-
3
- Permission is hereby granted, free of charge, to any person
4
- obtaining a copy of this software and associated documentation
5
- files (the "Software"), to deal in the Software without
6
- restriction, including without limitation the rights to use,
7
- copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the
9
- Software is furnished to do so, subject to the following
10
- conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
@@ -1,18 +0,0 @@
1
- # has
2
-
3
- > Object.prototype.hasOwnProperty.call shortcut
4
-
5
- ## Installation
6
-
7
- ```sh
8
- npm install --save has
9
- ```
10
-
11
- ## Usage
12
-
13
- ```js
14
- var has = require('has');
15
-
16
- has({}, 'hasOwnProperty'); // false
17
- has(Object.prototype, 'hasOwnProperty'); // true
18
- ```