Skip to content

Commit

Permalink
remove category
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Feb 17, 2023
1 parent ab820f0 commit 9b796c8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
6 changes: 0 additions & 6 deletions cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3430,12 +3430,6 @@ declare namespace Cypress {
* @example `cypress-ct-${string} for third parties. Any string is valid internally.
*/
type: string

/**
* Only `library` is supported for third party definitions.
* `template` will be supported in the future.
*/
category: 'library'
}

interface AngularDevServerProjectConfig {
Expand Down
2 changes: 0 additions & 2 deletions cli/types/tests/cypress-npm-api-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const solid = {
const thirdPartyFrameworkDefinition = defineComponentFramework({
type: 'cypress-ct-third-party',
name: 'Third Party',
category: 'library',
dependencies: (bundler) => [solid],
detectors: [solid],
supportedBundlers: ['vite', 'webpack']
Expand All @@ -76,7 +75,6 @@ const thirdPartyFrameworkDefinition = defineComponentFramework({
const thirdPartyFrameworkDefinitionInvalidStrings = defineComponentFramework({
type: 'cypress-ct-third-party',
name: 'Third Party',
category: 'template', // $ExpectError
dependencies: (bundler) => [],
detectors: [{}], // $ExpectError
supportedBundlers: ['metro', 'webpack'] // $ExpectError
Expand Down
2 changes: 1 addition & 1 deletion packages/scaffold-config/src/ct-detect-third-party.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const thirdPartyDefinitionPrefixes = {
globalPrefix: 'cypress-ct-',
}

export function isThirdPartyDefinition (definition: Cypress.ComponentFrameworkDefinition | Cypress.ThirdPartyComponentFrameworkDefinition): definition is Cypress.ThirdPartyComponentFrameworkDefinition {
export function isThirdPartyDefinition (definition: Cypress.ComponentFrameworkDefinition | Cypress.ThirdPartyComponentFrameworkDefinition): boolean {
return definition.type.startsWith(thirdPartyDefinitionPrefixes.globalPrefix) ||
thirdPartyDefinitionPrefixes.namespacedPrefixRe.test(definition.type)
}
Expand Down
3 changes: 2 additions & 1 deletion packages/scaffold-config/src/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,13 @@ export function resolveComponentFrameworkDefinition (definition: Cypress.Compone
if (thirdParty) {
return {
...definition,
category: 'library',
dependencies,
configFramework: definition.type,
supportStatus: 'community',
mountModule: () => Promise.resolve(definition.type),
}
}

return { ...definition, dependencies }
return { ...definition as Cypress.ComponentFrameworkDefinition, dependencies }
}

0 comments on commit 9b796c8

Please sign in to comment.