Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local and head manifest schemas #2379

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Mearman
Copy link
Collaborator

@Mearman Mearman commented Jul 1, 2024

No description provided.

The generateSchemaId function in generate-schema-id.ts has been updated to accept an options object as a parameter, allowing for more flexibility in generating the schema ID. This change improves the maintainability and extensibility of the code.
The manifest tests in index.test.ts have been updated to use relative schema paths instead of absolute paths. This change improves the portability and maintainability of the tests.
Copy link

changeset-bot bot commented Jul 1, 2024

⚠️ No Changeset found

Latest commit: ca41142

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Mearman Mearman self-assigned this Jul 1, 2024
@Mearman Mearman requested review from aomarks and paullewis and removed request for aomarks July 12, 2024 06:58
Copy link
Contributor

@paullewis paullewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. I think it would be really helpful to boost the README, either in this PR or another, to briefly explain more of what this package does, and what the various local/head stuff means.

const readSchemaFile = fs.readFileSync(ABSOLUTE_SCHEMA_PATH, "utf-8");
const parsedSchema = JSON.parse(readSchemaFile);
const validate = await ajv.compileAsync(parsedSchema);
// const readSchemaFile = fs.readFileSync(ABSOLUTE_SCHEMA_PATH, "utf-8");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-nit: please remove the comments

if (errors) {
throw new Error(`errors: ${JSON.stringify(errors, null, 2)}`);
const schemaPaths = [
// { path: ABSOLUTE_SCHEMA_PATH },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Samesies :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants