-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 fix: give Windsurf a crack at dealing with JSR's restrictions (afte…
…r providing a hint)
- Loading branch information
Showing
9 changed files
with
30 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { ValidatedString } from './ValidatedString.ts'; | ||
const isAlphabeticOrUnderscoreOrHyphen = (s: string) => /^[a-zA-Z_-]+$/.test(s); | ||
|
||
const { factory, type } = ValidatedString.create( | ||
// Why JSRCompatibleFactory? See https://github.com/axhxrx/validated-string/issues/1 | ||
const JSRCompatibleFactory = ValidatedString.create( | ||
isAlphabeticOrUnderscoreOrHyphen, | ||
{ | ||
name: 'AlphabeticOrUnderscoreOrHyphenString', | ||
description: 'must contain only letters (A-Z, a-z), underscores, or hyphens', | ||
}, | ||
); | ||
|
||
const type = JSRCompatibleFactory.type; | ||
const factory = JSRCompatibleFactory.factory; | ||
|
||
export type AlphabeticOrUnderscoreOrHyphenString = typeof type; | ||
export const AlphabeticOrUnderscoreOrHyphenString = factory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters