Skip to content
Merged
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: 5 additions & 6 deletions bazel/validation/verify-typescript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ async function main([packageJsonPath, moduleLockFilePath]) {
// the first value/item from the `generaredRepoSpecs` property and get the version from the
// attributes there.
const generatedRepoSpecs =
// TODO: Remove pre bazel v8 lockfile attribute path.
moduleLock['moduleExtensions']?.['@@aspect_rules_ts~//ts:extensions.bzl%ext']?.['general']?.[
'generatedRepoSpecs'
] ||
moduleLock['moduleExtensions']?.['@@aspect_rules_ts+//ts:extensions.bzl%ext']?.['general']?.[
'generatedRepoSpecs'
];
lockfileVersion =
// TODO: Remove pre bazel v8 lockfile attribute path.
Object.values(generatedRepoSpecs || {})[0]?.['attributes']?.['version'] ||
moduleLock['moduleExtensions']['@@aspect_rules_ts+//ts:extensions.bzl%ext']['general'][
'generatedRepoSpecs'
]['npm_typescript']?.['attributes']?.['version'] ||
'unknown';
Object.values(generatedRepoSpecs || {})[0]?.['attributes']?.['version'] || 'unknown';
} catch {
console.error('Unable to find the typescript version within the MODULE.bazel.lock file.');
}
Expand Down
Loading