MCPcopy Create free account
hub / github.com/QwikDev/qwik / assertRightQwikDepsVersions

Function assertRightQwikDepsVersions

scripts/validate-cli.ts:151–171  ·  view source on GitHub ↗
(appPkgJson: any, qwikVersion: string, starterType: string)

Source from the content-addressed store, hash-verified

149}
150
151function assertRightQwikDepsVersions(appPkgJson: any, qwikVersion: string, starterType: string) {
152 assert.strictEqual(
153 appPkgJson.devDependencies['@builder.io/qwik'].includes(qwikVersion),
154 true,
155 `Qwik version mismatch for "${starterType}" starter`
156 );
157 if (appPkgJson.devDependencies.hasOwnProperty('@builder.io/qwik-city')) {
158 assert.strictEqual(
159 appPkgJson.devDependencies['@builder.io/qwik-city'].includes(qwikVersion),
160 true,
161 `Qwik City version mismatch for "${starterType}" starter`
162 );
163 }
164 if (appPkgJson.devDependencies.hasOwnProperty('eslint-plugin-qwik')) {
165 assert.strictEqual(
166 appPkgJson.devDependencies['eslint-plugin-qwik'].includes(qwikVersion),
167 true,
168 `ESlint plugin version mismatch for "${starterType}" starter`
169 );
170 }
171}
172
173function cpSync(src: string, dest: string) {
174 // cpSync() not available until Node v16.7.0

Callers 1

validateStarterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected