This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: entrypoints for plugins (#126)
* chore: entrypoints for plugins * refactor: rename plugins and omit the plugin suffix * refactor: use kebab case for the plugin names * docs(changeset): refactor!: use dedicated entrypoints for the plugins
- Loading branch information
Showing
18 changed files
with
2,727 additions
and
2,227 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@scalar/openapi-parser': minor | ||
--- | ||
|
||
refactor!: use dedicated entrypoints for the plugins |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './load' | ||
export * from './plugins' |
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 was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
packages/openapi-parser/src/utils/load/plugins/readFiles.test.ts
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import { readFiles } from './readFiles' | ||
|
||
describe('readFiles', async () => { | ||
it('returns true for a filename', async () => { | ||
expect(readFiles().check('openapi.yaml')).toBe(true) | ||
}) | ||
|
||
it('returns true for a path', async () => { | ||
expect(readFiles().check('../specification/openapi.yaml')).toBe(true) | ||
}) | ||
|
||
it('returns false for an object', async () => { | ||
expect(readFiles().check({})).toBe(false) | ||
}) | ||
|
||
it('returns false for undefinded', async () => { | ||
expect(readFiles().check()).toBe(false) | ||
}) | ||
|
||
it('returns false for an url', async () => { | ||
expect( | ||
readFiles().check('http://example.com/specification/openapi.yaml'), | ||
).toBe(false) | ||
}) | ||
}) |
Oops, something went wrong.