@atlaspack/resolver-default 2.14.5-canary.137 → 2.14.5-canary.139

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
@@ -1,5 +1,13 @@
1
1
  # @atlaspack/resolver-default
2
2
 
3
+ ## 2.14.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/node-resolver-core@3.5.21
9
+ - @atlaspack/plugin@2.14.21
10
+
3
11
  ## 2.14.20
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,3 @@
1
+ import { Resolver } from '@atlaspack/plugin';
2
+ declare const _default: Resolver<unknown>;
3
+ export default _default;
@@ -39,6 +39,7 @@ var _default = exports.default = new (_plugin().Resolver)({
39
39
  shouldAutoInstall: options.shouldAutoInstall,
40
40
  mode: options.mode,
41
41
  logger,
42
+ // @ts-expect-error TS2339
42
43
  packageExports: (conf === null || conf === void 0 || (_conf$contents = conf.contents) === null || _conf$contents === void 0 ? void 0 : _conf$contents.packageExports) ?? false
43
44
  });
44
45
  },
@@ -50,8 +51,6 @@ var _default = exports.default = new (_plugin().Resolver)({
50
51
  if (WEBPACK_IMPORT_REGEX.test(dependency.specifier)) {
51
52
  throw new Error(`The import path: ${dependency.specifier} is using webpack specific loader import syntax, which isn't supported by Parcel.`);
52
53
  }
53
-
54
- // $FlowFixMe
55
54
  return resolver.resolve({
56
55
  filename: specifier,
57
56
  specifierType: dependency.specifierType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/resolver-default",
3
- "version": "2.14.5-canary.137+069de478e",
3
+ "version": "2.14.5-canary.139+d2fd84977",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,18 +9,22 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/DefaultResolver.js",
13
- "source": "src/DefaultResolver.js",
12
+ "main": "./lib/DefaultResolver.js",
13
+ "source": "./src/DefaultResolver.ts",
14
+ "types": "./lib/DefaultResolver.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/node-resolver-core": "3.5.5-canary.137+069de478e",
19
- "@atlaspack/plugin": "2.14.5-canary.137+069de478e"
19
+ "@atlaspack/node-resolver-core": "3.5.5-canary.139+d2fd84977",
20
+ "@atlaspack/plugin": "2.14.5-canary.139+d2fd84977"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@babel/core": "^7.22.11"
23
24
  },
24
25
  "type": "commonjs",
25
- "gitHead": "069de478e64fb5889f6f2ce023eb510782767fbd"
26
- }
26
+ "scripts": {
27
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src"
28
+ },
29
+ "gitHead": "d2fd849770fe6305e9c694bd97b1bd905abd9d94"
30
+ }
@@ -1,5 +1,3 @@
1
- // @flow
2
-
3
1
  import {Resolver} from '@atlaspack/plugin';
4
2
  import NodeResolver from '@atlaspack/node-resolver-core';
5
3
 
@@ -7,7 +5,7 @@ import NodeResolver from '@atlaspack/node-resolver-core';
7
5
  // ex. `imports-loader?$=jquery!./example.js`
8
6
  const WEBPACK_IMPORT_REGEX = /^\w+-loader(?:\?\S*)?!/;
9
7
 
10
- export default (new Resolver({
8
+ export default new Resolver({
11
9
  async loadConfig({config, options, logger}) {
12
10
  let conf = await config.getConfig([], {
13
11
  packageKey: '@atlaspack/resolver-default',
@@ -20,6 +18,7 @@ export default (new Resolver({
20
18
  shouldAutoInstall: options.shouldAutoInstall,
21
19
  mode: options.mode,
22
20
  logger,
21
+ // @ts-expect-error TS2339
23
22
  packageExports: conf?.contents?.packageExports ?? false,
24
23
  });
25
24
  },
@@ -30,7 +29,6 @@ export default (new Resolver({
30
29
  );
31
30
  }
32
31
 
33
- // $FlowFixMe
34
32
  return resolver.resolve({
35
33
  filename: specifier,
36
34
  specifierType: dependency.specifierType,
@@ -42,4 +40,4 @@ export default (new Resolver({
42
40
  packageConditions: dependency.packageConditions,
43
41
  });
44
42
  },
45
- }): Resolver<mixed>);
43
+ }) as Resolver<unknown>;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }