node-red-contrib-tak-registration 0.9.0 → 0.11.0

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 (65) hide show
  1. package/README.md +7 -0
  2. package/node_modules/@types/node/README.md +1 -1
  3. package/node_modules/@types/node/async_hooks.d.ts +2 -0
  4. package/node_modules/@types/node/fs.d.ts +12 -7
  5. package/node_modules/@types/node/http.d.ts +40 -8
  6. package/node_modules/@types/node/index.d.ts +1 -1
  7. package/node_modules/@types/node/inspector.d.ts +2 -2
  8. package/node_modules/@types/node/module.d.ts +29 -4
  9. package/node_modules/@types/node/package.json +2 -2
  10. package/node_modules/@types/node/process.d.ts +3 -2
  11. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +2 -0
  12. package/node_modules/@types/node/ts4.8/fs.d.ts +12 -7
  13. package/node_modules/@types/node/ts4.8/http.d.ts +40 -8
  14. package/node_modules/@types/node/ts4.8/inspector.d.ts +2 -2
  15. package/node_modules/@types/node/ts4.8/module.d.ts +29 -4
  16. package/node_modules/@types/node/ts4.8/process.d.ts +3 -2
  17. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +2 -1
  18. package/node_modules/@types/node/worker_threads.d.ts +2 -1
  19. package/node_modules/define-data-property/.eslintrc +24 -0
  20. package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
  21. package/node_modules/define-data-property/.nycrc +13 -0
  22. package/node_modules/define-data-property/CHANGELOG.md +31 -0
  23. package/node_modules/define-data-property/LICENSE +21 -0
  24. package/node_modules/define-data-property/README.md +67 -0
  25. package/node_modules/define-data-property/index.d.ts +3 -0
  26. package/node_modules/define-data-property/index.d.ts.map +1 -0
  27. package/node_modules/define-data-property/index.js +60 -0
  28. package/node_modules/define-data-property/package.json +111 -0
  29. package/node_modules/define-data-property/test/index.js +397 -0
  30. package/node_modules/define-data-property/tsconfig.json +58 -0
  31. package/node_modules/define-data-property/tsinit +109 -0
  32. package/node_modules/define-properties/CHANGELOG.md +8 -0
  33. package/node_modules/define-properties/index.js +5 -11
  34. package/node_modules/define-properties/package.json +5 -4
  35. package/node_modules/gopd/.eslintrc +16 -0
  36. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  37. package/node_modules/gopd/CHANGELOG.md +25 -0
  38. package/node_modules/gopd/LICENSE +21 -0
  39. package/node_modules/gopd/README.md +40 -0
  40. package/node_modules/gopd/index.js +16 -0
  41. package/node_modules/gopd/package.json +71 -0
  42. package/node_modules/gopd/test/index.js +35 -0
  43. package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
  44. package/node_modules/regexp.prototype.flags/CHANGELOG.md +8 -0
  45. package/node_modules/regexp.prototype.flags/implementation.js +3 -6
  46. package/node_modules/regexp.prototype.flags/package.json +8 -7
  47. package/node_modules/set-function-name/.eslintrc +20 -0
  48. package/node_modules/set-function-name/.github/FUNDING.yml +12 -0
  49. package/node_modules/set-function-name/CHANGELOG.md +39 -0
  50. package/node_modules/set-function-name/LICENSE +21 -0
  51. package/node_modules/set-function-name/README.md +61 -0
  52. package/node_modules/set-function-name/index.js +22 -0
  53. package/node_modules/set-function-name/package.json +80 -0
  54. package/node_modules/uuid/CHANGELOG.md +6 -0
  55. package/node_modules/uuid/README.md +9 -5
  56. package/node_modules/uuid/dist/commonjs-browser/stringify.js +1 -1
  57. package/node_modules/uuid/dist/esm-browser/stringify.js +1 -1
  58. package/node_modules/uuid/dist/esm-node/stringify.js +1 -1
  59. package/node_modules/uuid/dist/stringify.js +1 -1
  60. package/node_modules/uuid/package.json +7 -3
  61. package/package.json +2 -2
  62. package/tak-ingest.html +3 -0
  63. package/tak-ingest.js +21 -1
  64. package/tak-registration.html +9 -2
  65. package/tak-registration.js +95 -57
@@ -0,0 +1,397 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+ var v = require('es-value-fixtures');
5
+ var forEach = require('for-each');
6
+ var inspect = require('object-inspect');
7
+ var has = require('has');
8
+ var hasPropertyDescriptors = require('has-property-descriptors')();
9
+ var getOwnPropertyDescriptors = require('object.getownpropertydescriptors');
10
+
11
+ var defineDataProperty = require('../');
12
+
13
+ test('defineDataProperty', function (t) {
14
+ t.test('argument validation', function (st) {
15
+ forEach(v.primitives, function (nonObject) {
16
+ st['throws'](
17
+ // @ts-expect-error
18
+ function () { defineDataProperty(nonObject, 'key', 'value'); },
19
+ TypeError,
20
+ 'throws on non-object input: ' + inspect(nonObject)
21
+ );
22
+ });
23
+
24
+ forEach(v.nonPropertyKeys, function (nonPropertyKey) {
25
+ st['throws'](
26
+ // @ts-expect-error
27
+ function () { defineDataProperty({}, nonPropertyKey, 'value'); },
28
+ TypeError,
29
+ 'throws on non-PropertyKey input: ' + inspect(nonPropertyKey)
30
+ );
31
+ });
32
+
33
+ forEach(v.nonBooleans, function (nonBoolean) {
34
+ if (nonBoolean !== null) {
35
+ st['throws'](
36
+ // @ts-expect-error
37
+ function () { defineDataProperty({}, 'key', 'value', nonBoolean); },
38
+ TypeError,
39
+ 'throws on non-boolean nonEnumerable: ' + inspect(nonBoolean)
40
+ );
41
+
42
+ st['throws'](
43
+ // @ts-expect-error
44
+ function () { defineDataProperty({}, 'key', 'value', false, nonBoolean); },
45
+ TypeError,
46
+ 'throws on non-boolean nonWritable: ' + inspect(nonBoolean)
47
+ );
48
+
49
+ st['throws'](
50
+ // @ts-expect-error
51
+ function () { defineDataProperty({}, 'key', 'value', false, false, nonBoolean); },
52
+ TypeError,
53
+ 'throws on non-boolean nonConfigurable: ' + inspect(nonBoolean)
54
+ );
55
+ }
56
+ });
57
+
58
+ st.end();
59
+ });
60
+
61
+ t.test('normal data property', function (st) {
62
+ /** @type {Record<PropertyKey, string>} */
63
+ var obj = { existing: 'existing property' };
64
+ st.ok(has(obj, 'existing'), 'has initial own property');
65
+ st.equal(obj.existing, 'existing property', 'has expected initial value');
66
+
67
+ var res = defineDataProperty(obj, 'added', 'added property');
68
+ st.equal(res, void undefined, 'returns `undefined`');
69
+ st.ok(has(obj, 'added'), 'has expected own property');
70
+ st.equal(obj.added, 'added property', 'has expected value');
71
+
72
+ defineDataProperty(obj, 'existing', 'new value');
73
+ st.ok(has(obj, 'existing'), 'still has expected own property');
74
+ st.equal(obj.existing, 'new value', 'has new expected value');
75
+
76
+ defineDataProperty(obj, 'explicit1', 'new value', false);
77
+ st.ok(has(obj, 'explicit1'), 'has expected own property (explicit enumerable)');
78
+ st.equal(obj.explicit1, 'new value', 'has new expected value (explicit enumerable)');
79
+
80
+ defineDataProperty(obj, 'explicit2', 'new value', false, false);
81
+ st.ok(has(obj, 'explicit2'), 'has expected own property (explicit writable)');
82
+ st.equal(obj.explicit2, 'new value', 'has new expected value (explicit writable)');
83
+
84
+ defineDataProperty(obj, 'explicit3', 'new value', false, false, false);
85
+ st.ok(has(obj, 'explicit3'), 'has expected own property (explicit configurable)');
86
+ st.equal(obj.explicit3, 'new value', 'has new expected value (explicit configurable)');
87
+
88
+ st.end();
89
+ });
90
+
91
+ t.test('loose mode', function (st) {
92
+ var obj = { existing: 'existing property' };
93
+
94
+ defineDataProperty(obj, 'added', 'added value 1', true, null, null, true);
95
+ st.deepEqual(
96
+ getOwnPropertyDescriptors(obj),
97
+ {
98
+ existing: {
99
+ configurable: true,
100
+ enumerable: true,
101
+ value: 'existing property',
102
+ writable: true
103
+ },
104
+ added: {
105
+ configurable: true,
106
+ enumerable: !hasPropertyDescriptors,
107
+ value: 'added value 1',
108
+ writable: true
109
+ }
110
+ },
111
+ 'in loose mode, obj still adds property 1'
112
+ );
113
+
114
+ defineDataProperty(obj, 'added', 'added value 2', false, true, null, true);
115
+ st.deepEqual(
116
+ getOwnPropertyDescriptors(obj),
117
+ {
118
+ existing: {
119
+ configurable: true,
120
+ enumerable: true,
121
+ value: 'existing property',
122
+ writable: true
123
+ },
124
+ added: {
125
+ configurable: true,
126
+ enumerable: true,
127
+ value: 'added value 2',
128
+ writable: !hasPropertyDescriptors
129
+ }
130
+ },
131
+ 'in loose mode, obj still adds property 2'
132
+ );
133
+
134
+ defineDataProperty(obj, 'added', 'added value 3', false, false, true, true);
135
+ st.deepEqual(
136
+ getOwnPropertyDescriptors(obj),
137
+ {
138
+ existing: {
139
+ configurable: true,
140
+ enumerable: true,
141
+ value: 'existing property',
142
+ writable: true
143
+ },
144
+ added: {
145
+ configurable: !hasPropertyDescriptors,
146
+ enumerable: true,
147
+ value: 'added value 3',
148
+ writable: true
149
+ }
150
+ },
151
+ 'in loose mode, obj still adds property 3'
152
+ );
153
+
154
+ st.end();
155
+ });
156
+
157
+ t.test('non-normal data property, ES3', { skip: hasPropertyDescriptors }, function (st) {
158
+ /** @type {Record<PropertyKey, string>} */
159
+ var obj = { existing: 'existing property' };
160
+
161
+ st['throws'](
162
+ function () { defineDataProperty(obj, 'added', 'added value', true); },
163
+ SyntaxError,
164
+ 'nonEnumerable throws a Syntax Error'
165
+ );
166
+
167
+ st['throws'](
168
+ function () { defineDataProperty(obj, 'added', 'added value', false, true); },
169
+ SyntaxError,
170
+ 'nonWritable throws a Syntax Error'
171
+ );
172
+
173
+ st['throws'](
174
+ function () { defineDataProperty(obj, 'added', 'added value', false, false, true); },
175
+ SyntaxError,
176
+ 'nonWritable throws a Syntax Error'
177
+ );
178
+
179
+ st.deepEqual(
180
+ getOwnPropertyDescriptors(obj),
181
+ {
182
+ existing: {
183
+ configurable: true,
184
+ enumerable: true,
185
+ value: 'existing property',
186
+ writable: true
187
+ }
188
+ },
189
+ 'obj still has expected descriptors'
190
+ );
191
+
192
+ st.end();
193
+ });
194
+
195
+ t.test('new non-normal data property, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
196
+ /** @type {Record<PropertyKey, string>} */
197
+ var obj = { existing: 'existing property' };
198
+
199
+ defineDataProperty(obj, 'nonEnum', null, true);
200
+ defineDataProperty(obj, 'nonWrit', null, false, true);
201
+ defineDataProperty(obj, 'nonConf', null, false, false, true);
202
+
203
+ st.deepEqual(
204
+ getOwnPropertyDescriptors(obj),
205
+ {
206
+ existing: {
207
+ configurable: true,
208
+ enumerable: true,
209
+ value: 'existing property',
210
+ writable: true
211
+ },
212
+ nonEnum: {
213
+ configurable: true,
214
+ enumerable: false,
215
+ value: null,
216
+ writable: true
217
+ },
218
+ nonWrit: {
219
+ configurable: true,
220
+ enumerable: true,
221
+ value: null,
222
+ writable: false
223
+ },
224
+ nonConf: {
225
+ configurable: false,
226
+ enumerable: true,
227
+ value: null,
228
+ writable: true
229
+ }
230
+ },
231
+ 'obj has expected property descriptors'
232
+ );
233
+
234
+ st.end();
235
+ });
236
+
237
+ t.test('existing non-normal data property, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
238
+ // test case changing an existing non-normal property
239
+
240
+ /** @type {Record<string, null | string>} */
241
+ var obj = {};
242
+ Object.defineProperty(obj, 'nonEnum', { configurable: true, enumerable: false, value: null, writable: true });
243
+ Object.defineProperty(obj, 'nonWrit', { configurable: true, enumerable: true, value: null, writable: false });
244
+ Object.defineProperty(obj, 'nonConf', { configurable: false, enumerable: true, value: null, writable: true });
245
+
246
+ st.deepEqual(
247
+ getOwnPropertyDescriptors(obj),
248
+ {
249
+ nonEnum: {
250
+ configurable: true,
251
+ enumerable: false,
252
+ value: null,
253
+ writable: true
254
+ },
255
+ nonWrit: {
256
+ configurable: true,
257
+ enumerable: true,
258
+ value: null,
259
+ writable: false
260
+ },
261
+ nonConf: {
262
+ configurable: false,
263
+ enumerable: true,
264
+ value: null,
265
+ writable: true
266
+ }
267
+ },
268
+ 'obj initially has expected property descriptors'
269
+ );
270
+
271
+ defineDataProperty(obj, 'nonEnum', 'new value', false);
272
+ defineDataProperty(obj, 'nonWrit', 'new value', false, false);
273
+ st['throws'](
274
+ function () { defineDataProperty(obj, 'nonConf', 'new value', false, false, false); },
275
+ TypeError,
276
+ 'can not alter a nonconfigurable property'
277
+ );
278
+
279
+ st.deepEqual(
280
+ getOwnPropertyDescriptors(obj),
281
+ {
282
+ nonEnum: {
283
+ configurable: true,
284
+ enumerable: true,
285
+ value: 'new value',
286
+ writable: true
287
+ },
288
+ nonWrit: {
289
+ configurable: true,
290
+ enumerable: true,
291
+ value: 'new value',
292
+ writable: true
293
+ },
294
+ nonConf: {
295
+ configurable: false,
296
+ enumerable: true,
297
+ value: null,
298
+ writable: true
299
+ }
300
+ },
301
+ 'obj ends up with expected property descriptors'
302
+ );
303
+
304
+ st.end();
305
+ });
306
+
307
+ t.test('frozen object, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
308
+ var frozen = Object.freeze({ existing: true });
309
+
310
+ st['throws'](
311
+ function () { defineDataProperty(frozen, 'existing', 'new value'); },
312
+ TypeError,
313
+ 'frozen object can not modify an existing property'
314
+ );
315
+
316
+ st['throws'](
317
+ function () { defineDataProperty(frozen, 'new', 'new property'); },
318
+ TypeError,
319
+ 'frozen object can not add a new property'
320
+ );
321
+
322
+ st.end();
323
+ });
324
+
325
+ t.test('sealed object, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
326
+ var sealed = Object.seal({ existing: true });
327
+ st.deepEqual(
328
+ Object.getOwnPropertyDescriptor(sealed, 'existing'),
329
+ {
330
+ configurable: false,
331
+ enumerable: true,
332
+ value: true,
333
+ writable: true
334
+ },
335
+ 'existing value on sealed object has expected descriptor'
336
+ );
337
+
338
+ defineDataProperty(sealed, 'existing', 'new value');
339
+
340
+ st.deepEqual(
341
+ Object.getOwnPropertyDescriptor(sealed, 'existing'),
342
+ {
343
+ configurable: false,
344
+ enumerable: true,
345
+ value: 'new value',
346
+ writable: true
347
+ },
348
+ 'existing value on sealed object has changed descriptor'
349
+ );
350
+
351
+ st['throws'](
352
+ function () { defineDataProperty(sealed, 'new', 'new property'); },
353
+ TypeError,
354
+ 'sealed object can not add a new property'
355
+ );
356
+
357
+ st.end();
358
+ });
359
+
360
+ t.test('nonextensible object, ES5+', { skip: !hasPropertyDescriptors }, function (st) {
361
+ var nonExt = Object.preventExtensions({ existing: true });
362
+
363
+ st.deepEqual(
364
+ Object.getOwnPropertyDescriptor(nonExt, 'existing'),
365
+ {
366
+ configurable: true,
367
+ enumerable: true,
368
+ value: true,
369
+ writable: true
370
+ },
371
+ 'existing value on non-extensible object has expected descriptor'
372
+ );
373
+
374
+ defineDataProperty(nonExt, 'existing', 'new value', true);
375
+
376
+ st.deepEqual(
377
+ Object.getOwnPropertyDescriptor(nonExt, 'existing'),
378
+ {
379
+ configurable: true,
380
+ enumerable: false,
381
+ value: 'new value',
382
+ writable: true
383
+ },
384
+ 'existing value on non-extensible object has changed descriptor'
385
+ );
386
+
387
+ st['throws'](
388
+ function () { defineDataProperty(nonExt, 'new', 'new property'); },
389
+ TypeError,
390
+ 'non-extensible object can not add a new property'
391
+ );
392
+
393
+ st.end();
394
+ });
395
+
396
+ t.end();
397
+ });
@@ -0,0 +1,58 @@
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": "es2022", /* 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
+ "resolveJsonModule": true, /* Enable importing .json files. */
22
+
23
+ /* JavaScript Support */
24
+ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
25
+ "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
26
+ "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
27
+
28
+ /* Emit */
29
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
30
+ "declarationMap": true, /* Create sourcemaps for d.ts files. */
31
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
32
+ "noEmit": true, /* Disable emitting files from a compilation. */
33
+
34
+ /* Interop Constraints */
35
+ "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
36
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
37
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
38
+
39
+ /* Type Checking */
40
+ "strict": true, /* Enable all strict type-checking options. */
41
+ "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
42
+ "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
43
+ "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
44
+ "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
45
+ "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
46
+ "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
47
+ "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
48
+ "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
49
+ "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
50
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
51
+
52
+ /* Completeness */
53
+ // "skipLibCheck": true /* Skip type checking all .d.ts files. */
54
+ },
55
+ "exclude": [
56
+ "coverage"
57
+ ]
58
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
+
27
+ /* Modules */
28
+ "module": "commonjs", /* Specify what module code is generated. */
29
+ // "rootDir": "./", /* Specify the root folder within your source files. */
30
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42
+ // "resolveJsonModule": true, /* Enable importing .json files. */
43
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
+
46
+ /* JavaScript Support */
47
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
48
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
49
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50
+
51
+ /* Emit */
52
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
53
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
54
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58
+ // "outDir": "./", /* Specify an output folder for all emitted files. */
59
+ // "removeComments": true, /* Disable emitting comments. */
60
+ // "noEmit": true, /* Disable emitting files from a compilation. */
61
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
62
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
63
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
64
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
65
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
67
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
68
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
69
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
70
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
71
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
72
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
73
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
74
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75
+
76
+ /* Interop Constraints */
77
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
79
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
80
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
81
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83
+
84
+ /* Type Checking */
85
+ "strict": true, /* Enable all strict type-checking options. */
86
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
89
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
90
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
91
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
92
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
93
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
94
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
95
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
96
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
97
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
98
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
99
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
100
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
101
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
102
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
103
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104
+
105
+ /* Completeness */
106
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
108
+ }
109
+ }
@@ -5,6 +5,14 @@ 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
+ ## [v1.2.1](https://github.com/ljharb/define-properties/compare/v1.2.0...v1.2.1) - 2023-09-12
9
+
10
+ ### Commits
11
+
12
+ - [Refactor] use `define-data-property` [`e7782a7`](https://github.com/ljharb/define-properties/commit/e7782a7480a62f8b6e141b49371e6de4df176c97)
13
+ - [actions] use reusable rebase action [`cd249c3`](https://github.com/ljharb/define-properties/commit/cd249c3920607bc8eeb7c0cd5b672b810983cac5)
14
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`8205f97`](https://github.com/ljharb/define-properties/commit/8205f9734a4da8ee5b3b29798788567a09b330e8)
15
+
8
16
  ## [v1.2.0](https://github.com/ljharb/define-properties/compare/v1.1.4...v1.2.0) - 2023-02-10
9
17
 
10
18
  ### Commits
@@ -5,15 +5,13 @@ var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbo
5
5
 
6
6
  var toStr = Object.prototype.toString;
7
7
  var concat = Array.prototype.concat;
8
- var origDefineProperty = Object.defineProperty;
8
+ var defineDataProperty = require('define-data-property');
9
9
 
10
10
  var isFunction = function (fn) {
11
11
  return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
12
12
  };
13
13
 
14
- var hasPropertyDescriptors = require('has-property-descriptors')();
15
-
16
- var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
14
+ var supportsDescriptors = require('has-property-descriptors')();
17
15
 
18
16
  var defineProperty = function (object, name, value, predicate) {
19
17
  if (name in object) {
@@ -25,15 +23,11 @@ var defineProperty = function (object, name, value, predicate) {
25
23
  return;
26
24
  }
27
25
  }
26
+
28
27
  if (supportsDescriptors) {
29
- origDefineProperty(object, name, {
30
- configurable: true,
31
- enumerable: false,
32
- value: value,
33
- writable: true
34
- });
28
+ defineDataProperty(object, name, value, true);
35
29
  } else {
36
- object[name] = value; // eslint-disable-line no-param-reassign
30
+ defineDataProperty(object, name, value);
37
31
  }
38
32
  };
39
33
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "define-properties",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "author": "Jordan Harband <ljharb@gmail.com>",
5
5
  "funding": {
6
6
  "url": "https://github.com/sponsors/ljharb"
@@ -34,19 +34,20 @@
34
34
  "ES5"
35
35
  ],
36
36
  "dependencies": {
37
+ "define-data-property": "^1.0.1",
37
38
  "has-property-descriptors": "^1.0.0",
38
39
  "object-keys": "^1.1.1"
39
40
  },
40
41
  "devDependencies": {
41
- "@ljharb/eslint-config": "^21.0.1",
42
- "aud": "^2.0.2",
42
+ "@ljharb/eslint-config": "^21.1.0",
43
+ "aud": "^2.0.3",
43
44
  "auto-changelog": "^2.4.0",
44
45
  "eslint": "=8.8.0",
45
46
  "in-publish": "^2.0.1",
46
47
  "npmignore": "^0.3.0",
47
48
  "nyc": "^10.3.2",
48
49
  "safe-publish-latest": "^2.0.0",
49
- "tape": "^5.6.3"
50
+ "tape": "^5.6.6"
50
51
  },
51
52
  "testling": {
52
53
  "files": "test/index.js",