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

Only use our npm for @salesforce packages #611

Merged
merged 9 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
registry=https://npm.lwcjs.org/
registry=https://registry.npmjs.org/
7 changes: 4 additions & 3 deletions packages/salesforcedx-vscode-lwc-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
"dependencies": {
"@salesforce/salesforcedx-utils-vscode": "43.14.0",
"ajv": "^6.1.1",
"eslint": "4.16.0",
"eslint-plugin-lwc": "0.4.0",
"lwc-language-server": "1.6.6",
"eslint-plugin-lwc":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lcampos - npm also has a feature to specify a tarball URL. See https://docs.npmjs.com/files/package.json#urls-as-dependencies

So I used that instead of bundling it directly. I got this url using, e.g., npm view --registry=https://npm.lwcjs.org/ [email protected]

"http://npm.lwcjs.org/eslint-plugin-lwc/-/eslint-plugin-lwc-0.4.0/643f5e18247ca8c0a60bf972f4d3795c97e8e6fe.tgz",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rsalvador - Due to possibly, jdx/npm-register#129, the npm.lwcjs.org registry is not properly sending back the packages for @babel and @types. Thus, instead of using the package that way, we embed the tar.url.

This was done by getting the dist.tarball using, e.g., npm view --registry=https://npm.lwcjs.org/ [email protected]. The tar.gz URL option is supported through https://docs.npmjs.com/files/package.json#urls-as-dependencies

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When you are back from the weekend, it might be worthwhile to see if we want to use https://docs.npmjs.com/files/package.json#bundleddependencies to the lwc-language-server so that we can do it without specifying all its dependencies chain. I think this is a consequence of the refactor that was going on. [email protected] didn't need all these other dependencies brought in.

Choose a reason for hiding this comment

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

Ok, will try that when publishing the next lwc-language-server version

"lwc-language-server":
"http://npm.lwcjs.org/lwc-language-server/-/lwc-language-server-1.6.1/48af811b08f90d445c0a5185071129d29df73d39.tgz",
Copy link
Contributor

Choose a reason for hiding this comment

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

We were using version 1.6.6 and this tarball is 1.6.1, any reason for not using 1.6.6 tarball ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. No this is a typo when I was copy-and-pasting. We should use 1.6.6. Let me fix this.

"rxjs": "^5.4.1",
"vscode-extension-telemetry": "0.0.17",
"vscode-languageclient": "3.5.1"
Expand Down
6 changes: 4 additions & 2 deletions packages/salesforcedx-vscode-lwc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
"@salesforce/salesforcedx-utils-vscode": "43.14.0",
"ajv": "^6.1.1",
"eslint": "4.16.0",
"eslint-plugin-lwc": "0.3.2",
"lwc-language-server": "1.5.1",
"eslint-plugin-lwc":
"http://npm.lwcjs.org/eslint-plugin-lwc/-/eslint-plugin-lwc-0.3.2/1265d7c33e7c3b01d6b01aabbc6ae8e6023f87b1.tgz",
"lwc-language-server":
"http://npm.lwcjs.org/lwc-language-server/-/lwc-language-server-1.5.1/bf8dd827a1649f8a48654f9b4db7d6d3ae5844d9.tgz",
"rxjs": "^5.4.1",
"vscode-extension-telemetry": "0.0.17",
"vscode-languageclient": "3.5.1"
Expand Down