Skip to content

Commit 2395157

Browse files
committed
chore(compartment-mapper): reformat
1 parent 81afaca commit 2395157

File tree

7 files changed

+9
-12
lines changed

7 files changed

+9
-12
lines changed

packages/compartment-mapper/src/hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export const makeHookExecutor = (
248248

249249
// Direct hook (e.g., "moduleSource", "packageDescriptor")
250250
const hookValue = effectiveConfig[name];
251-
251+
252252
if (hookValue === undefined) {
253253
return undefined;
254254
}

packages/compartment-mapper/src/types/external.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ export type FileUrlString = `file://${string}`;
622622
* Options provided to all Compartment Map Transforms.
623623
*/
624624
export type CompartmentMapTransformOptions = Required<LogOptions> &
625-
PolicyOption
625+
PolicyOption;
626626

627627
/**
628628
* Public API provided to a {@link CompartmentMapTransformFn} as the

packages/compartment-mapper/test/fixtures-dynamic-ancestor/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sequenceDiagram
1010
participant pantspack
1111
participant pantspack-folder-runner
1212
participant jorts-folder
13-
13+
1414
activate app
1515
app->>+pantspack: run pantspack
1616
deactivate app
@@ -28,9 +28,9 @@ sequenceDiagram
2828
2929
```
3030

31-
The main "app" is `webpackish-app`, which contains a [`pantspack.config.js`](./node_modules/webpackish-app/pantspack.config.js) file. This file specifies the _name_ of a "folder", which is `jorts-folder`. `jorts-folder` _is not_ loaded directly by `pantspack.config.js`.
31+
The main "app" is `webpackish-app`, which contains a [`pantspack.config.js`](./node_modules/webpackish-app/pantspack.config.js) file. This file specifies the _name_ of a "folder", which is `jorts-folder`. `jorts-folder` _is not_ loaded directly by `pantspack.config.js`.
3232

33-
`webpackish-app` uses `pantspack` to "build" itself. Its `build` script:
33+
`webpackish-app` uses `pantspack` to "build" itself. Its `build` script:
3434

3535
```sh
3636
node ../pantspack/pantspack.js --config pantspack.config.js

packages/compartment-mapper/test/fixtures-implicit-reexport/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@
66
"preinstall": "echo DO NOT INSTALL TEST FIXTURES; exit -1"
77
}
88
}
9-
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
This fixture is for testing the behavior of `mapNodeModules()` when a package has no declared `peerDependencies` _but_ has a `peerDependenciesMeta` field listing an _optional_ dependency.
22

3-
The _intent_ of this configuration is to declare _optional_ peer dependencies.
3+
The _intent_ of this configuration is to declare _optional_ peer dependencies.
44

55
`npm@7+` requires all dependencies mentioned in `peerDependenciesMeta` must to be declared in `peerDependencies`. This enables automatic installation of the peer dependencies (which is then allowed to fail).
66

7-
Prior to `npm@7`, there was no way to declare a peer dependency as optional, leading packages to _omit_ optional `peerDependencies` from `package.json`.
7+
Prior to `npm@7`, there was no way to declare a peer dependency as optional, leading packages to _omit_ optional `peerDependencies` from `package.json`.
88

99
I do not know if `yarn` or `pnpm` (any version) do anything with a lone `peerDependenciesMeta` field. Assuming they don't, `peerDependenciesMeta` w/o a `peerDependencies` is little more than a _hint_ to a human reader.

packages/compartment-mapper/test/make-import-hook-maker.hooks.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ const testFixture = {
3434

3535
/**
3636
* AVA macro for testing moduleSource hook with different loader functions
37-
*
37+
*
3838
* This could be more narrowly-typed, but it's a test.
39-
*
39+
*
4040
* @param {ExecutionContext} t
4141
* @param {object} options
4242
* @param {Function} options.loaderFn - The function to call (captureFromMap, loadFromMap, or loadLocation)

packages/compartment-mapper/test/policy.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ const anyExpectations = {
114114
}),
115115
};
116116

117-
118117
const powerlessCarolExpectations = {
119118
namespace: moduleify({
120119
...defaultExpectations.namespace,
@@ -208,7 +207,6 @@ scaffold(
208207
t.snapshot(sanitizePaths(error.message), 'location case error message');
209208
}
210209
// see the snapshot for the error hint in the message
211-
212210
},
213211
addGlobals: globals,
214212
policy: {

0 commit comments

Comments
 (0)