Skip to content

Conversation

kimadeline
Copy link

For #16102

@kimadeline kimadeline added the skip package*.json package.json and package-lock.json don't both need updating label May 17, 2021
@kimadeline kimadeline self-assigned this May 17, 2021
@kimadeline kimadeline marked this pull request as ready for review May 17, 2021 23:52
@github-actions github-actions bot requested review from karrtikr and karthiknadig May 17, 2021 23:52
const packageJsonContents = await fsExtra.readFile('package.json', 'utf-8');
const packageJson = JSON.parse(packageJsonContents);
packageJson.extensionPack = ['ms-python.vscode-pylance'].concat(
packageJson.extensionPack = ['ms-toolsai.jupyter', 'ms-python.vscode-pylance'].concat(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not hardcode this in package.json instead of injecting this during build time?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. That should work. Since these are optional dependencies they should not affect debugging like required dependencies did.

Copy link
Author

@kimadeline kimadeline May 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we ok with hardcoding them now? There were some concerns about hardcoding Pylance when we added it.

Copy link
Author

@kimadeline kimadeline May 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed with @brettcannon, not going to hardcode this, as we would prefer keeping the package.json dependency-free, and add them at build time instead.

const packageJson = JSON.parse(packageJsonContents);
packageJson.extensionPack = ['ms-python.vscode-pylance'].concat(
packageJson.extensionPack = ['ms-toolsai.jupyter', 'ms-python.vscode-pylance'].concat(
packageJson.extensionPack ? packageJson.extensionPack : [],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
packageJson.extensionPack ? packageJson.extensionPack : [],
packageJson.extensionPack || [],

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we follow the previous comment this won't be needed.

Co-authored-by: Kartik Raj <karraj@microsoft.com>
@kimadeline kimadeline merged commit 99ca421 into microsoft:16102-jupyter-dependency May 18, 2021
@kimadeline kimadeline deleted the 16102-jupyter-optional-dependency branch May 18, 2021 21:10
karrtikr pushed a commit that referenced this pull request Jun 8, 2021
* Make Jupyter an optional dependency (#16267)

* News entry

* Move Jupyter to the optional dependencies step

* Update news/1 Enhancements/16102.md

Co-authored-by: Kartik Raj <karraj@microsoft.com>

Co-authored-by: Kartik Raj <karraj@microsoft.com>

* License wording update (#16278)

* Wording

* License wording

* Add a "Jupyter not installed" notification helper (#16321)

* Add telemetry info
* Use enum for the telemetry
* Add prompt as a standalone function
* Remove "Install" from the prompt
* Make it a class
* Register singleton
* Rename file to a long but descriptive name
* Unit tests
* Add to package.nls.json
* Use sinon for tests

* Use the same "Jupyter is not installed" message everywhere (#16372)

* rename to showJupyterNotInstalledPrompt

* Replace existing prompt with new prompt

* Remove Jupyter check from command manager

* Update the start page to use the prompt (#16417)

* Update copy

* Update origin key

* Show prompt if jupyter not installed & should show

* Add tests for this functionality only

* Update news entry

* Remove comments

* follow-up from the merge

* Add singletons for startpage functional tests

* Missing one symbol

* Update src/client/common/startPage/startPage.ts

Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>

* Add logging

Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>

Co-authored-by: Kartik Raj <karraj@microsoft.com>
Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip package*.json package.json and package-lock.json don't both need updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants