@atlaspack/resolver-glob 2.14.5-canary.172 → 2.14.5-canary.173

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.
@@ -57,9 +57,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
57
57
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
58
58
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
59
59
  const jsAssetTypes = new Set(['jsx', 'ts', 'tsx', 'mjs', 'mts', 'cts']);
60
- function errorToThrowableDiagnostic(error,
61
- // @ts-expect-error TS2304
62
- dependency) {
60
+ function errorToThrowableDiagnostic(error, dependency) {
63
61
  return new (_diagnostic().default)({
64
62
  diagnostic: {
65
63
  message: error,
@@ -70,7 +68,6 @@ dependency) {
70
68
  });
71
69
  }
72
70
  var _default = exports.default = new (_plugin().Resolver)({
73
- // @ts-expect-error TS2322
74
71
  async resolve({
75
72
  dependency,
76
73
  options,
@@ -97,8 +94,6 @@ var _default = exports.default = new (_plugin().Resolver)({
97
94
  if (error) {
98
95
  throw errorToThrowableDiagnostic(error, dependency);
99
96
  }
100
-
101
- // @ts-expect-error TS2304
102
97
  let invalidateOnFileCreate = [];
103
98
  let invalidateOnFileChange = new Set();
104
99
  switch (specifier[0]) {
@@ -237,11 +232,7 @@ var _default = exports.default = new (_plugin().Resolver)({
237
232
  };
238
233
  }
239
234
  });
240
- function set(
241
- // @ts-expect-error TS7006
242
- obj, path,
243
- // @ts-expect-error TS2304
244
- value) {
235
+ function set(obj, path, value) {
245
236
  for (let i = 0; i < path.length - 1; i++) {
246
237
  let part = path[i];
247
238
  if (obj[part] == null) {
@@ -251,8 +242,6 @@ value) {
251
242
  }
252
243
  obj[path[path.length - 1]] = value;
253
244
  }
254
-
255
- // @ts-expect-error TS7006
256
245
  function generate(matches, isAsync, indent = '', count = 0) {
257
246
  if (typeof matches === 'string') {
258
247
  if (isAsync) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/resolver-glob",
3
- "version": "2.14.5-canary.172+88439807b",
3
+ "version": "2.14.5-canary.173+f93000336",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -16,10 +16,11 @@
16
16
  "node": ">= 16.0.0"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/diagnostic": "2.14.1-canary.240+88439807b",
20
- "@atlaspack/node-resolver-core": "3.5.5-canary.172+88439807b",
21
- "@atlaspack/plugin": "2.14.5-canary.172+88439807b",
22
- "@atlaspack/utils": "2.14.5-canary.172+88439807b",
19
+ "@atlaspack/diagnostic": "2.14.1-canary.241+f93000336",
20
+ "@atlaspack/node-resolver-core": "3.5.5-canary.173+f93000336",
21
+ "@atlaspack/plugin": "2.14.5-canary.173+f93000336",
22
+ "@atlaspack/types": "2.14.5-canary.173+f93000336",
23
+ "@atlaspack/utils": "2.14.5-canary.173+f93000336",
23
24
  "nullthrows": "^1.1.1"
24
25
  },
25
26
  "type": "commonjs",
@@ -27,5 +28,5 @@
27
28
  "check-ts": "tsc --emitDeclarationOnly --rootDir src",
28
29
  "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
29
30
  },
30
- "gitHead": "88439807be20025fd3433380204ff1205079729e"
31
+ "gitHead": "f930003364fdc31e5487520ebe256f1a9389f579"
31
32
  }
@@ -6,6 +6,11 @@ import {
6
6
  relativePath,
7
7
  normalizeSeparators,
8
8
  } from '@atlaspack/utils';
9
+ import type {
10
+ Dependency,
11
+ FileCreateInvalidation,
12
+ FilePath,
13
+ } from '@atlaspack/types';
9
14
  import path from 'path';
10
15
  import nullthrows from 'nullthrows';
11
16
  import ThrowableDiagnostic, {
@@ -18,7 +23,6 @@ const jsAssetTypes = new Set(['jsx', 'ts', 'tsx', 'mjs', 'mts', 'cts']);
18
23
 
19
24
  function errorToThrowableDiagnostic(
20
25
  error: string,
21
- // @ts-expect-error TS2304
22
26
  dependency: Dependency,
23
27
  ): ThrowableDiagnostic {
24
28
  return new ThrowableDiagnostic({
@@ -38,7 +42,6 @@ function errorToThrowableDiagnostic(
38
42
  }
39
43
 
40
44
  export default new Resolver({
41
- // @ts-expect-error TS2322
42
45
  async resolve({dependency, options, specifier, pipeline, logger}) {
43
46
  if (!isGlob(specifier)) {
44
47
  return;
@@ -69,9 +72,8 @@ export default new Resolver({
69
72
  throw errorToThrowableDiagnostic(error, dependency);
70
73
  }
71
74
 
72
- // @ts-expect-error TS2304
73
75
  let invalidateOnFileCreate: Array<FileCreateInvalidation> = [];
74
- let invalidateOnFileChange = new Set();
76
+ let invalidateOnFileChange = new Set<string>();
75
77
 
76
78
  switch (specifier[0]) {
77
79
  // Path specifier
@@ -230,10 +232,8 @@ export default new Resolver({
230
232
  }) as Resolver<unknown>;
231
233
 
232
234
  function set(
233
- // @ts-expect-error TS7006
234
- obj,
235
+ obj: Record<string, any>,
235
236
  path: Array<never> | Array<string>,
236
- // @ts-expect-error TS2304
237
237
  value: FilePath | string,
238
238
  ) {
239
239
  for (let i = 0; i < path.length - 1; i++) {
@@ -249,8 +249,12 @@ function set(
249
249
  obj[path[path.length - 1]] = value;
250
250
  }
251
251
 
252
- // @ts-expect-error TS7006
253
- function generate(matches, isAsync: boolean, indent = '', count = 0) {
252
+ function generate(
253
+ matches: Record<string, any>,
254
+ isAsync: boolean,
255
+ indent = '',
256
+ count = 0,
257
+ ) {
254
258
  if (typeof matches === 'string') {
255
259
  if (isAsync) {
256
260
  return {