Skip to content

Commit

Permalink
update lightning language servers to v2.2.17 (#1981)
Browse files Browse the repository at this point in the history
* update to the new public npm versions of lsps
* remove the npmrc file
* fix lints
* clear circleCI caches
  • Loading branch information
nrkruk authored Feb 14, 2020
1 parent 52db52e commit 580bbc6
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 29 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ commands:
- checkout
- restore_cache:
keys:
- dependency-cache-v1-{{ checksum "package.json" }}
- dependency-cache-v2-{{ checksum "package.json" }}
# if cache for exact version of 'package.json' is not present, then load the most recent cache
- dependency-cache-v1-
- dependency-cache-v2-
- run: npm install
- run:
name: 'Compile in production mode'
Expand All @@ -40,7 +40,7 @@ commands:
- store_artifacts:
path: ./extensions
- save_cache:
key: dependency-cache-v1-{{ checksum "package.json" }}
key: dependency-cache-v2-{{ checksum "package.json" }}
paths:
- node_modules

Expand All @@ -51,9 +51,9 @@ commands:
- checkout
- restore_cache:
keys:
- dependency-cache-win2-{{ checksum "package.json" }}
- dependency-cache-win3-{{ checksum "package.json" }}
# if cache for exact version of 'package.json' is not present, then load the most recent cache
- dependency-cache-win2-
- dependency-cache-win3-
- run:
name: 'Install node'
shell: bash.exe
Expand All @@ -75,7 +75,7 @@ commands:
shell: bash.exe
command: npm run compile
- save_cache:
key: dependency-cache-win2-{{ checksum "package.json" }}
key: dependency-cache-win3-{{ checksum "package.json" }}
paths:
- node_modules
- run:
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"snyk:test": "lerna exec --bail=false --ignore salesforcedx-vscode -- snyk test --severity-threshold=medium --show-vulnerable-paths=false",
"snyk:monitor": "lerna exec --bail=false --ignore salesforcedx-vscode -- snyk monitor --severity-threshold=medium --show-vulnerable-paths=false --org=vazexqi",
"aggregateJUnit": "node scripts/aggregate-junit-xml.js",
"link-lsp": "lerna exec yarn link aura-language-server lwc-language-server lightning-lsp-common --scope salesforcedx-vscode-lightning && lerna exec yarn link lwc-language-server lightning-lsp-common --scope salesforcedx-vscode-lwc"
"link-lsp": "lerna exec yarn link @salesforce/aura-language-server @salesforce/lwc-language-server @salesforce/lightning-lsp-common --scope salesforcedx-vscode-lightning && lerna exec yarn link @salesforce/lwc-language-server @salesforce/lightning-lsp-common --scope salesforcedx-vscode-lwc",
"unlink-lsp": "lerna exec yarn unlink @salesforce/aura-language-server @salesforce/lwc-language-server @salesforce/lightning-lsp-common --scope salesforcedx-vscode-lightning && lerna exec yarn unlink @salesforce/lwc-language-server @salesforce/lightning-lsp-common --scope salesforcedx-vscode-lwc"
},
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions packages/salesforcedx-vscode-lightning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
],
"dependencies": {
"@salesforce/salesforcedx-utils-vscode": "47.17.1",
"aura-language-server": "2.2.7",
"lwc-language-server": "2.2.7",
"@salesforce/aura-language-server": "2.2.17",
"@salesforce/lwc-language-server": "2.2.17",
"change-case": "^3.1.0",
"lightning-lsp-common": "2.2.7",
"@salesforce/lightning-lsp-common": "2.2.17",
"open": "6.0.0",
"vscode-extension-telemetry": "0.0.17",
"vscode-languageclient": "^5.2.1",
Expand Down
12 changes: 9 additions & 3 deletions packages/salesforcedx-vscode-lightning/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { shared as lspCommon } from 'lightning-lsp-common';
import { WorkspaceType } from 'lightning-lsp-common/lib/shared';
import { shared as lspCommon } from '@salesforce/lightning-lsp-common';
import { WorkspaceType } from '@salesforce/lightning-lsp-common/lib/shared';
import * as path from 'path';
import {
commands,
Expand Down Expand Up @@ -92,7 +92,13 @@ export async function activate(context: ExtensionContext) {

// Setup the language server
const serverModule = context.asAbsolutePath(
path.join('node_modules', 'aura-language-server', 'lib', 'server.js')
path.join(
'node_modules',
'@salesforce',
'aura-language-server',
'lib',
'server.js'
)
);

// The debug options for the server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { AttributeInfo, TagInfo } from '@salesforce/lightning-lsp-common';
import {
isUnknown,
WorkspaceType
} from '@salesforce/lightning-lsp-common/lib/shared';
import { paramCase } from 'change-case';
import { AttributeInfo, TagInfo } from 'lightning-lsp-common';
import { isUnknown, WorkspaceType } from 'lightning-lsp-common/lib/shared';
import {
commands,
Event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import * as fs from 'fs';
import * as path from 'path';

const checkedPackagePatterns: RegExp[] = [
/lightning-lsp-common/i,
/aura-language-server/i,
/lwc-language-server/i,
/^@salesforce\/lightning-lsp-common/i,
/^@salesforce\/aura-language-server/i,
/^@salesforce\/lwc-language-server/i,
/^@salesforce\/salesforcedx/i
];

Expand Down
4 changes: 2 additions & 2 deletions packages/salesforcedx-vscode-lwc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"eslint": "5.0.0",
"jest-editor-support": "^26.0.0-beta",
"jest-regex-util": "^24.9.0",
"lightning-lsp-common": "2.2.7",
"lwc-language-server": "2.2.7",
"@salesforce/lightning-lsp-common": "2.2.17",
"@salesforce/lwc-language-server": "2.2.17",
"rxjs": "^5.4.1",
"strip-ansi": "^5.2.0",
"uuid": "^3.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { componentUtil } from '@salesforce/lightning-lsp-common';
import * as fs from 'fs';
import { componentUtil } from 'lightning-lsp-common';
import * as vscode from 'vscode';
import { nls } from '../messages';
import { DevServerService } from '../service/devServerService';
Expand Down
10 changes: 8 additions & 2 deletions packages/salesforcedx-vscode-lwc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { shared as lspCommon } from 'lightning-lsp-common';
import { shared as lspCommon } from '@salesforce/lightning-lsp-common';
import * as path from 'path';
import * as vscode from 'vscode';
import {
Expand Down Expand Up @@ -148,7 +148,13 @@ function registerCommands(
function startLWCLanguageServer(context: ExtensionContext) {
// Setup the language server
const serverModule = context.asAbsolutePath(
path.join('node_modules', 'lwc-language-server', 'lib', 'server.js')
path.join(
'node_modules',
'@salesforce',
'lwc-language-server',
'lib',
'server.js'
)
);
const debugOptions = { execArgv: ['--nolazy', '--inspect=6009'] };
// If the extension is launched in debug mode then the debug server options are used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { Indexer } from '@salesforce/lightning-lsp-common';
import { parse } from 'jest-editor-support';
import { Indexer } from 'lightning-lsp-common';
import * as vscode from 'vscode';
import {
extractPositionFromFailureMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import * as fs from 'fs';
import * as path from 'path';

const checkedPackagePatterns: RegExp[] = [
/lightning-lsp-common/i,
/aura-language-server/i,
/lwc-language-server/i,
/^@salesforce\/lightning-lsp-common/i,
/^@salesforce\/aura-language-server/i,
/^@salesforce\/lwc-language-server/i,
/^@salesforce\/salesforcedx/i
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { activate } from '../../../src/index';
import * as vscode from 'vscode';
import sinon, { stubInterface, stubObject } from 'ts-sinon';
import * as sinonChai from 'sinon-chai';
import { shared as lspCommon } from 'lightning-lsp-common';
import { shared as lspCommon } from '@salesforce/lightning-lsp-common';

chai.use(sinonChai);
const { expect, assert } = chai;
Expand Down

0 comments on commit 580bbc6

Please sign in to comment.