-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update azdata-test in notebooks extension #24984
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,7 +183,7 @@ export class BookModel { | |
if (this._tableOfContentsPath) { | ||
try { | ||
let fileContents = await fsPromises.readFile(this._configPath, 'utf-8'); | ||
const config = yaml.safeLoad(fileContents.toString()); | ||
const config = yaml.safeLoad(fileContents.toString()) as JupyterBookSection; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @barbaravaldez could you double check if this cast and the one below in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JupyterBookSection is the only class I'm seeing with a title field for this one, and the tableOfContents variable in bookTocManager already had a JupyterBookSection[] type. Looks good to me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup! It looks good to me |
||
fileContents = await fsPromises.readFile(this._tableOfContentsPath, 'utf-8'); | ||
let tableOfContents: any = yaml.safeLoad(fileContents.toString()); | ||
const parsedTOC: IJupyterBookToc = { sections: this.parseJupyterSections(this._bookVersion, tableOfContents) }; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,7 +150,7 @@ export class BookTocManager implements IBookTocManager { | |
} | ||
|
||
for (const [key, value] of this.tocFiles.entries()) { | ||
const yamlFile = await yaml.safeLoad(value); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this wasn't related to the package version update, but it was a red squiggly when I was in the file, so updated this while I was there |
||
const yamlFile = yaml.safeLoad(value); | ||
await fs.writeFile(key, yaml.safeDump(yamlFile, { lineWidth: Infinity, noRefs: true, skipInvalid: true })); | ||
} | ||
} | ||
|
@@ -192,7 +192,7 @@ export class BookTocManager implements IBookTocManager { | |
*/ | ||
async updateTOC(version: BookVersion, tocPath: string, findSection?: JupyterBookSection, addSection?: JupyterBookSection): Promise<void> { | ||
const tocFile = await fs.readFile(tocPath, 'utf8'); | ||
this.tableofContents = yaml.safeLoad(tocFile); | ||
this.tableofContents = yaml.safeLoad(tocFile) as JupyterBookSection[]; | ||
if (!this.tocFiles.has(tocPath)) { | ||
this.tocFiles.set(tocPath, tocFile); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to update this version to get rid of the error when
yarn npm-run-all -lp extensions-ci
was getting run in the Compile & Hygiene step of the PR validation pipeline (example failure) .The problem was that the type definition file for @types/minipass couldn't be located, but when I looked at the @types/minipass folder in notebooks node_modules folder, the readme said that minipass already includes it's types definition, so dependencies on @types/minipass are unnecessary and it's expected that there isn't an index.d.ts file. The @types/minipass package has been marked as deprecated, so it really shouldn't be used.
Version 4.0.3 of @types/tar has a dependency on @types/minipass, but the latest version has a dependency on minipass, so updating the version resolved the issue of the @types/minipass index.d.ts file not being found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we're using v6 of tar anyways, so this is the correct thing to do for that regardless! 😄