@lumjs/compat 1.3.0 → 1.3.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.3.1] - 2022-10-18
10
+ ### Fixed
11
+ - The `v4/loadtracker` was trying to call a function from the old `Lum` global.
12
+ I replaced it with a new `opts.self` constructor parameter that gets assigned to
13
+ the `this.$self` property.
14
+ ### Changed
15
+ - Bumped `@lumjs/core` to `1.7.1`
16
+ - Using some of the new `ModuleBuilder` shortcuts.
17
+
9
18
  ## [1.3.0] - 2022-10-13
10
19
  ### Changed
11
20
  - Bumped `@lumjs/core` to `1.6.1`.
@@ -34,7 +43,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
34
43
  ### Added
35
44
  - Initial release.
36
45
 
37
- [Unreleased]: https://github.com/supernovus/lum.compat.js/compare/v1.3.0...HEAD
46
+ [Unreleased]: https://github.com/supernovus/lum.compat.js/compare/v1.3.1...HEAD
47
+ [1.3.1]: https://github.com/supernovus/lum.compat.js/compare/v1.3.0...v1.3.1
38
48
  [1.3.0]: https://github.com/supernovus/lum.compat.js/compare/v1.2.0...v1.3.0
39
49
  [1.2.0]: https://github.com/supernovus/lum.compat.js/compare/v1.1.0...v1.2.0
40
50
  [1.1.0]: https://github.com/supernovus/lum.compat.js/compare/v1.0.0...v1.1.0
package/lib/v4/index.js CHANGED
@@ -13,46 +13,39 @@ const {can,from} = require('@lumjs/core').buildModule(module);
13
13
  * @see module:@lumjs/compat/v4/descriptors
14
14
  */
15
15
  can('descriptors');
16
- //exports.descriptors = require('./descriptors');
17
16
 
18
17
  /**
19
18
  * @name module:@lumjs/compat/v4.DESC
20
19
  * @see module:@lumjs/compat/v4/descriptors.DESC
21
20
  */
22
21
  from('descriptors', true, 'DESC');
23
- //exports.DESC = exports.descriptors.DESC;
24
22
 
25
23
  /**
26
24
  * @name module:@lumjs/compat/v4.prop
27
25
  * @see module:@lumjs/compat/v4/prop
28
26
  */
29
27
  can('prop');
30
- //exports.prop = require('./prop');
31
28
 
32
29
  /**
33
30
  * @name module:@lumjs/compat/v4.deprecated
34
31
  * @see module:@lumjs/compat/v4/deprecated
35
32
  */
36
33
  can('deprecated');
37
- //exports.deprecated = require('./deprecated');
38
34
 
39
35
  /**
40
36
  * @name module:@lumjs/compat/v4.LoadTracker
41
37
  * @see module:@lumjs/compat/v4/loadtracker
42
38
  */
43
- can('LoadTracker', {module: './loadtracker'});
44
- //exports.LoadTracker = require('./loadtracker');
39
+ can('LoadTracker', true);
45
40
 
46
41
  /**
47
42
  * @name module:@lumjs/compat/v4.Promise
48
43
  * @see module:@lumjs/compat/v4/promise
49
44
  */
50
- can('Promise', {module: './promise'});
51
- //exports.Promise = require('./promise');
45
+ can('Promise', true);
52
46
 
53
47
  /**
54
48
  * @name module:@lumjs/compat/v4.obj
55
49
  * @see module:@lumjs/compat/v4/object-helpers
56
50
  */
57
- can('obj', {module: './object-helpers'});
58
- //exports.obj = require('./object-helpers');
51
+ can('obj', './object-helpers');
@@ -91,7 +91,7 @@ class LoadTracker
91
91
  def(this, '$check', opts.check ?? false);
92
92
  def(this, '$typeOne', opts.type ?? 'item');
93
93
  def(this, '$typeAll', opts.types ?? this.$typeOne + 's');
94
-
94
+ def(this, '$self', opts.self);
95
95
  }
96
96
 
97
97
  /**
@@ -325,7 +325,7 @@ class LoadTracker
325
325
  *
326
326
  * The default method names are:
327
327
  *
328
- * `mark` → Call `lt.mark`, returns `ourself()`.
328
+ * `mark` → Call `lt.mark`, returns `this.$self`.
329
329
  * `has` → Proxy `lt.is`.
330
330
  * `check` → Proxy `lt.checkOne`.
331
331
  * `checkAll` → Proxy `lt.checkAll`.
@@ -368,7 +368,7 @@ class LoadTracker
368
368
  addfunc(function()
369
369
  {
370
370
  thisLoad.mark(...arguments);
371
- return ourself();
371
+ return thisLoad.$self;
372
372
  });
373
373
  }
374
374
 
@@ -448,7 +448,7 @@ class LoadTracker
448
448
  addfunc(function()
449
449
  {
450
450
  const missing = getname('missing');
451
- return ns[missing]({fatal: true, ok: ourself()}, ...arguments);
451
+ return ns[missing]({fatal: true, ok: thisLoad.$self}, ...arguments);
452
452
  });
453
453
  }
454
454
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumjs/compat",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "lib/index.js",
5
5
  "exports": {
6
6
  ".": "./lib/index.js",
@@ -16,7 +16,7 @@
16
16
  "url": "https://github.com/supernovus/lum.compat.js.git"
17
17
  },
18
18
  "dependencies": {
19
- "@lumjs/core": "^1.6.1",
19
+ "@lumjs/core": "^1.7.1",
20
20
  "semver": "^7.3.7"
21
21
  },
22
22
  "scripts":