Skip to content

Commit 2fc1bf8

Browse files
committed
chore: run prettier
Signed-off-by: Sam Gammon <sam@elide.ventures>
1 parent 92bffd9 commit 2fc1bf8

40 files changed

Lines changed: 1401 additions & 1189 deletions

.github/workflows/ci.publish-package.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
registry:
1111
description: "Registry"
1212
type: string
13-
default: 'https://registry.npmjs.org'
13+
default: "https://registry.npmjs.org"
1414
dry-run:
1515
description: "Dry Run"
1616
type: boolean
@@ -47,18 +47,18 @@ on:
4747
type: choice
4848
required: true
4949
options:
50-
- java
51-
- maven
52-
- gradle
53-
- indexer
50+
- java
51+
- maven
52+
- gradle
53+
- indexer
5454
dry-run:
5555
description: "Dry Run"
5656
type: boolean
5757
default: false
5858
registry:
5959
description: "Registry"
6060
type: string
61-
default: 'https://registry.npmjs.org'
61+
default: "https://registry.npmjs.org"
6262
release:
6363
description: "Release to GitHub"
6464
type: boolean
@@ -101,7 +101,7 @@ jobs:
101101
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
102102
with:
103103
node-version: ${{ vars.NODE_VERSION || '21' }}
104-
registry-url: 'https://registry.npmjs.org'
104+
registry-url: "https://registry.npmjs.org"
105105
- name: "Setup: PNPM"
106106
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
107107
with:
@@ -207,7 +207,7 @@ jobs:
207207
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
208208
with:
209209
node-version: ${{ vars.NODE_VERSION || '21' }}
210-
registry-url: 'https://registry.npmjs.org'
210+
registry-url: "https://registry.npmjs.org"
211211
- name: "Setup: PNPM"
212212
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
213213
with:

.github/workflows/ci.publish-packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
registry:
1111
description: "Registry"
1212
type: string
13-
default: 'https://registry.npmjs.org'
13+
default: "https://registry.npmjs.org"
1414
release:
1515
description: "Release to GitHub"
1616
type: boolean
@@ -45,7 +45,7 @@ on:
4545
registry:
4646
description: "Registry"
4747
type: string
48-
default: 'https://registry.npmjs.org'
48+
default: "https://registry.npmjs.org"
4949
release:
5050
description: "Release to GitHub"
5151
type: boolean

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
This repository provides sub-module library overrides for popular Java libraries which don't yet provide JPMS support (at least until some PRs are merged!). There is a Maven repository which contains these artifacts, too, so you can safely use them in your projects.
2929

30-
> [!TIP] > **These libraries should be treated like `SNAPSHOT` versions until a release is issued. If you see hash failures with Gradle, make sure to pass `--refresh-dependencies --write-verification-metadata ...`. With Maven, pass `-U`.**
30+
> [!TIP]
31+
> **These libraries should be treated like `SNAPSHOT` versions until a release is issued. If you see hash failures with Gradle, make sure to pass `--refresh-dependencies --write-verification-metadata ...`. With Maven, pass `-U`.**
3132
3233
#### Pending PRs
3334

packages/gradle/gradle-constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
/**
1515
* Currently-latest Gradle Module schema version.
1616
*/
17-
export const GRADLE_SCHEMA_VERSION = '1.1'
17+
export const GRADLE_SCHEMA_VERSION = "1.1";

packages/gradle/gradle-facade.ts

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* License for the specific language governing permissions and limitations under the License.
1212
*/
1313

14-
import { basename, dirname } from "node:path"
15-
import { GradleAttribute, GradleModuleSchema, GradleVariantSchema } from "./gradle-schema"
16-
import { GradleModuleOptions, gradleModule } from "./gradle-util"
14+
import { basename, dirname } from "node:path";
15+
import { GradleAttribute, GradleModuleSchema, GradleVariantSchema } from "./gradle-schema";
16+
import { GradleModuleOptions, gradleModule } from "./gradle-util";
1717

1818
/**
1919
* Gradle Info
@@ -28,7 +28,7 @@ export interface GradleInfo {
2828
* @param attr Attribute to obtain a value for
2929
* @return Attribute value as a `string`, or `null`
3030
*/
31-
attribute(attr: GradleAttribute | string): string | null
31+
attribute(attr: GradleAttribute | string): string | null;
3232
}
3333

3434
/**
@@ -49,7 +49,7 @@ export class GradleVariant implements GradleInfo {
4949
* @return Value as a string, or `null`
5050
*/
5151
attribute(attr: GradleAttribute): string | null {
52-
return this._variant.attributes[attr] || null
52+
return this._variant.attributes[attr] || null;
5353
}
5454

5555
/**
@@ -59,7 +59,7 @@ export class GradleVariant implements GradleInfo {
5959
* @returns Wrapped variant data
6060
*/
6161
static fromData(data: GradleVariantSchema): GradleVariant {
62-
return new GradleVariant(data)
62+
return new GradleVariant(data);
6363
}
6464
}
6565

@@ -82,21 +82,21 @@ export class GradleModule implements GradleInfo {
8282
*/
8383
private constructor(
8484
private readonly _module: GradleModuleSchema,
85-
private readonly _file: string | null
85+
private readonly _file: string | null,
8686
) {}
8787

8888
/**
8989
* @returns Underlying Gradle Module data
9090
*/
9191
module(): GradleModuleSchema {
92-
return this._module
92+
return this._module;
9393
}
9494

9595
/**
9696
* @returns File from which this definition was parsed, as applicable
9797
*/
9898
file(): string | null {
99-
return this._file
99+
return this._file;
100100
}
101101

102102
/**
@@ -106,9 +106,9 @@ export class GradleModule implements GradleInfo {
106106
* @return Requested Gradle Variant, or `null`
107107
*/
108108
variant(name: string): GradleVariant | null {
109-
const variantData = this._module.variants.find((it) => it.name === name)
110-
if (variantData) return GradleVariant.fromData(variantData)
111-
return null
109+
const variantData = this._module.variants.find((it) => it.name === name);
110+
if (variantData) return GradleVariant.fromData(variantData);
111+
return null;
112112
}
113113

114114
/**
@@ -118,7 +118,7 @@ export class GradleModule implements GradleInfo {
118118
* @return Value as a string, or `null`
119119
*/
120120
attribute(attr: GradleAttribute | string): string | null {
121-
return this._module.component.attributes[attr] || null
121+
return this._module.component.attributes[attr] || null;
122122
}
123123

124124
/**
@@ -129,7 +129,7 @@ export class GradleModule implements GradleInfo {
129129
* @return Wrapped module definition
130130
*/
131131
static fromData(schema: GradleModuleSchema, file?: string): GradleModule {
132-
return new GradleModule(schema, file || null)
132+
return new GradleModule(schema, file || null);
133133
}
134134

135135
/**
@@ -141,14 +141,17 @@ export class GradleModule implements GradleInfo {
141141
* @return Wrapped module definition
142142
*/
143143
static async fromFile(path: string, optionalName?: string, options?: GradleModuleOptions): Promise<GradleModule> {
144-
const parent = !!optionalName ? path : dirname(path)
145-
const filename = !!optionalName ? optionalName : basename(path)
146-
const mod = await gradleModule(parent, filename, options || {
147-
validate: true,
148-
lenient: true,
149-
})
150-
if (!mod)
151-
throw new Error(`Failed to load Gradle module from file: ${parent}/${filename}`)
152-
return this.fromData(mod.module, mod.path)
144+
const parent = !!optionalName ? path : dirname(path);
145+
const filename = !!optionalName ? optionalName : basename(path);
146+
const mod = await gradleModule(
147+
parent,
148+
filename,
149+
options || {
150+
validate: true,
151+
lenient: true,
152+
},
153+
);
154+
if (!mod) throw new Error(`Failed to load Gradle module from file: ${parent}/${filename}`);
155+
return this.fromData(mod.module, mod.path);
153156
}
154157
}

packages/gradle/gradle-model.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,25 +95,25 @@ export type GradleComponent = {
9595
module: string;
9696
version: string;
9797
attributes: GradleAttributes;
98-
}
98+
};
9999

100100
/**
101101
* Gradle Creator Info
102102
*
103103
* Describes information about a Gradle build agent that created a Gradle Module
104104
*/
105105
export type GradleCreatorInfo = {
106-
version: string
107-
}
106+
version: string;
107+
};
108108

109109
/**
110110
* Gradle Created-By
111111
*
112112
* Describes the build agent that created the Gradle Module info
113113
*/
114114
export type GradleCreatedBy = {
115-
gradle: GradleCreatorInfo,
116-
}
115+
gradle: GradleCreatorInfo;
116+
};
117117

118118
/**
119119
* Gradle Module

packages/gradle/gradle-schema.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { object, array, string, number, InferType, ObjectSchema } from "yup"
2-
import { GRADLE_SCHEMA_VERSION } from "./gradle-constants"
1+
import { object, array, string, number, InferType, ObjectSchema } from "yup";
2+
import { GRADLE_SCHEMA_VERSION } from "./gradle-constants";
33

44
import {
55
GradleAttribute,
@@ -11,7 +11,7 @@ import {
1111
GradleModuleType,
1212
GradleReleaseFile,
1313
GradleVariant,
14-
} from "./gradle-model"
14+
} from "./gradle-model";
1515

1616
export type {
1717
GradleAttribute,
@@ -22,29 +22,27 @@ export type {
2222
GradleDependencyDeclaration,
2323
GradleModuleType,
2424
GradleReleaseFile,
25-
}
25+
};
2626

2727
const gradleComponentType = {
2828
url: string().label("URL").required(),
2929
group: string().label("Group").required(),
3030
module: string().label("Module").required(),
3131
version: string().label("Version").required(),
3232
attributes: object().label("Attributes").required(),
33-
}
33+
};
3434

35-
export const gradleComponentSchema: ObjectSchema<GradleComponent> = object(
36-
gradleComponentType
37-
)
35+
export const gradleComponentSchema: ObjectSchema<GradleComponent> = object(gradleComponentType);
3836

3937
const gradleCreatedByType = {
4038
gradle: object({
4139
version: string().label("Gradle Version").required(),
42-
}).label("Gradle").required(),
43-
}
40+
})
41+
.label("Gradle")
42+
.required(),
43+
};
4444

45-
export const gradleCreatedBySchema: ObjectSchema<GradleCreatedBy> = object(
46-
gradleCreatedByType
47-
)
45+
export const gradleCreatedBySchema: ObjectSchema<GradleCreatedBy> = object(gradleCreatedByType);
4846

4947
export const gradleDependencySchema: ObjectSchema<GradleDependencyDeclaration> = object({
5048
group: string().label("Group").required(),
@@ -53,8 +51,10 @@ export const gradleDependencySchema: ObjectSchema<GradleDependencyDeclaration> =
5351
requires: string().label("Requires").optional(),
5452
prefers: string().label("Prefers").optional(),
5553
strictly: string().label("Strictly").optional(),
56-
}).label("Version").required(),
57-
})
54+
})
55+
.label("Version")
56+
.required(),
57+
});
5858

5959
export const gradleFileSchema: ObjectSchema<GradleReleaseFile> = object({
6060
name: string().label("Name").required(),
@@ -64,18 +64,18 @@ export const gradleFileSchema: ObjectSchema<GradleReleaseFile> = object({
6464
sha1: string().label("SHA1").required(),
6565
sha256: string().label("SHA256").optional(),
6666
sha512: string().label("SHA512").optional(),
67-
})
67+
});
6868

6969
export const gradleVariantSchema: ObjectSchema<GradleVariant> = object({
7070
name: string().label("Name").required(),
7171
attributes: object().label("Attributes").required(),
7272
dependencies: array(gradleDependencySchema).optional(),
7373
files: array(gradleFileSchema).optional(),
74-
})
74+
});
7575

7676
export const gradleAttributesSchema: ObjectSchema<GradleAttributes> = object({
7777
// @TODO(sgammon): keyof string, valueof string, known attrs?
78-
})
78+
});
7979

8080
export const gradleModuleSchema: ObjectSchema<GradleModuleType> = object({
8181
// `formatVersion: "1.1"`

0 commit comments

Comments
 (0)