Skip to content
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

Adopt TAS client #959

Merged
merged 1 commit into from Mar 11, 2021
Merged

Adopt TAS client #959

merged 1 commit into from Mar 11, 2021

Conversation

jdneo
Copy link
Member

@jdneo jdneo commented Mar 10, 2021

Signed-off-by: Sheng Chen sheche@microsoft.com

Signed-off-by: Sheng Chen <sheche@microsoft.com>
}

export function initExpService(context: vscode.ExtensionContext): void {
const packageJson: {[key: string]: any} = require("../package.json");
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the path relationship will change after webpack, i would prefer to use the absolute path to get the package.json content.

const extensionPackage = JSON.parse(fs.readFileSync(context.asAbsolutePath("./package.json"), "utf-8"));

Copy link
Member Author

Choose a reason for hiding this comment

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

webpack can handle that. It will become something like

const packageJson = __webpack_require__(JSON.parse(<content of the package.json in string format>));

@testforstephen testforstephen added this to the 0.32.0 milestone Mar 10, 2021
@testforstephen testforstephen merged commit bf4f459 into master Mar 11, 2021
@testforstephen testforstephen deleted the cs/tas branch September 7, 2021 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants