Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,14 @@ jobs:
registry-url: "https://registry.npmjs.org"
- name: Build
run: deno task build-npm

jsr-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Publish (dry-run)
run: |
deno publish --dry-run
Comment on lines +75 to +84
Copy link

Choose a reason for hiding this comment

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

Consider adding a condition to only run the jsr-publish job on specific branches or under certain conditions.

  jsr-publish:
+   if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest

This ensures that the publish dry-run only occurs in scenarios where it's relevant, such as merges to the main branch, preventing unnecessary runs on feature branches or in response to other events that wouldn't affect publishing.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
jsr-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Publish (dry-run)
run: |
deno publish --dry-run
jsr-publish:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Publish (dry-run)
run: |
deno publish --dry-run

Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
export const snapshot = {};

snapshot[`isOptionalOf<T> > returns properly named function 1`] = `"isOptionalOf(isNumber)"`;

snapshot[`isOptionalOf<T> > returns properly named function 2`] = `"isOptionalOf(isNumber)"`;

snapshot[`isUnwrapOptionalOf<T> > returns properly named function 1`] = `"isNumber"`;

snapshot[`isUnwrapOptionalOf<T> > returns properly named function 2`] = `"isNumber"`;

snapshot[`isUnwrapOptionalOf<T> > returns properly named function 3`] = `"isNumber"`;

snapshot[`isReadonlyOf<T> > returns properly named function 1`] = `"isReadonlyOf(isNumber)"`;

snapshot[`isReadonlyOf<T> > returns properly named function 2`] = `"isReadonlyOf(isReadonlyOf(isNumber))"`;

snapshot[`isUnwrapReadonlyOf<T> > returns properly named function 1`] = `"isNumber"`;

snapshot[`isUnwrapReadonlyOf<T> > returns properly named function 2`] = `"isReadonlyOf(isNumber)"`;

snapshot[`isArrayOf<T> > returns properly named function 1`] = `"isArrayOf(isNumber)"`;

snapshot[`isArrayOf<T> > returns properly named function 2`] = `"isArrayOf((anonymous))"`;
Expand Down Expand Up @@ -195,3 +213,95 @@ snapshot[`isLiteralOf<T> > returns properly named function 6`] = `"isLiteralOf(u
snapshot[`isLiteralOf<T> > returns properly named function 7`] = `"isLiteralOf(Symbol(asdf))"`;

snapshot[`isLiteralOneOf<T> > returns properly named function 1`] = `'isLiteralOneOf(["hello", "world"])'`;

snapshot[`isUnionOf<T> > returns properly named function 1`] = `
"isUnionOf([
isNumber,
isString,
isBoolean
])"
`;

snapshot[`isIntersectionOf<T> > returns properly named function 1`] = `
"isObjectOf({
a: isNumber,
b: isString
})"
`;

snapshot[`isRequiredOf<T> > returns properly named function 1`] = `
"isObjectOf({
a: isNumber,
b: isUnionOf([
isString,
isUndefined
]),
c: isBoolean
})"
`;

snapshot[`isRequiredOf<T> > returns properly named function 2`] = `
"isObjectOf({
a: isNumber,
b: isUnionOf([
isString,
isUndefined
]),
c: isBoolean
})"
`;

snapshot[`isPartialOf<T> > returns properly named function 1`] = `
"isObjectOf({
a: isOptionalOf(isNumber),
b: isOptionalOf(isUnionOf([
isString,
isUndefined
])),
c: isOptionalOf(isBoolean)
})"
`;

snapshot[`isPartialOf<T> > returns properly named function 2`] = `
"isObjectOf({
a: isOptionalOf(isNumber),
b: isOptionalOf(isUnionOf([
isString,
isUndefined
])),
c: isOptionalOf(isBoolean)
})"
`;

snapshot[`isPickOf<T, K> > returns properly named function 1`] = `
"isObjectOf({
a: isNumber,
c: isBoolean
})"
`;

snapshot[`isPickOf<T, K> > returns properly named function 2`] = `"isObjectOf({a: isNumber})"`;

snapshot[`isOmitOf<T, K> > returns properly named function 1`] = `
"isObjectOf({
a: isNumber,
c: isBoolean
})"
`;

snapshot[`isOmitOf<T, K> > returns properly named function 2`] = `"isObjectOf({a: isNumber})"`;

snapshot[`isOneOf<T> > returns properly named function 1`] = `
"isUnionOf([
isNumber,
isString,
isBoolean
])"
`;

snapshot[`isAllOf<T> > returns properly named function 1`] = `
"isObjectOf({
a: isNumber,
b: isString
})"
`;
File renamed without changes.
Loading