Skip to content

Commit

Permalink
Upgrade to Smithy Language Server 0.2.4 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
srchase authored Nov 9, 2023
1 parent 30e140e commit 4c37661
Show file tree
Hide file tree
Showing 13 changed files with 534 additions and 424 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
out
node_modules
build
.coverage/
.vscode-test/
*.vsix
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
out/
node_modules/
build/
.vscode/
.vscode-test/
test-fixtures/**/build
887 changes: 495 additions & 392 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"icon": "images/smithy.png",
"publisher": "smithy",
"engines": {
"vscode": "^1.65.0"
"vscode": "^1.84.1"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -119,7 +119,7 @@
"smithyLsp.version": {
"scope": "window",
"type": "string",
"default": "0.2.3",
"default": "0.2.4",
"description": "Version of the Smithy LSP (see https://github.com/smithy-lang/smithy-language-server)"
},
"smithyLsp.rootPath": {
Expand All @@ -142,28 +142,28 @@
"test": "npm run format-check && npm run test-grammar && npm run test-extension"
},
"devDependencies": {
"@vscode/vsce": "^2.19.0",
"@types/follow-redirects": "^1.14.1",
"@types/follow-redirects": "^1.14.4",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "^18.15.3",
"@types/sinon": "^10.0.11",
"@types/vscode": "^1.65.0",
"@vscode/test-electron": "^2.1.3",
"glob": "^9.3.0",
"@types/mocha": "^10.0.4",
"@types/node": "^18.18.9",
"@types/sinon": "^10.0.20",
"@types/vscode": "^1.84.1",
"@vscode/test-electron": "^2.3.6",
"@vscode/vsce": "^2.22.0",
"glob": "^9.3.5",
"mocha": "^10.2.0",
"prettier": "^2.6.2",
"sinon": "^15.0.2",
"ts-loader": "^9.3.0",
"typescript": "^5.0.2",
"prettier": "^2.8.8",
"sinon": "^15.2.0",
"ts-loader": "^9.5.0",
"typescript": "^5.2.2",
"vscode-nls-dev": "^4.0.4",
"vscode-tmgrammar-test": "^0.1.1",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.1"
"vscode-tmgrammar-test": "^0.1.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"follow-redirects": "^1.14.9",
"vscode-languageclient": "^8.0.2",
"follow-redirects": "^1.15.3",
"vscode-languageclient": "^8.1.0",
"vscode-nls": "^5.2.0"
}
}
3 changes: 3 additions & 0 deletions test-fixtures/suite1/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"smithyLsp.logToFile": "enabled"
}
3 changes: 2 additions & 1 deletion test-fixtures/suite1/smithy-build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "1.0",
"maven": {
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.25.0"],
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.40.0"],
"repositories": [{ "url": "https://repo1.maven.org/maven2/" }]
}
}
6 changes: 1 addition & 5 deletions test-fixtures/suite2/main.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@ $version: "2.0"

namespace example.weather

/// Provides weather forecasts.
service Weather {
version: "2006-03-01"
operations: [GetCurrentTime]
}
apply smithy.api#String @deprecated
3 changes: 2 additions & 1 deletion test-fixtures/suite2/smithy-build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "1.0",
"maven": {
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.25.0"],
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.40.0"],
"repositories": [{ "url": "https://repo1.maven.org/maven2/" }]
}
}
3 changes: 2 additions & 1 deletion test-fixtures/suite3/smithy-build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "1.0",
"maven": {
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.25.0"],
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.40.0"],
"repositories": [{ "url": "https://repo1.maven.org/maven2/" }]
}
}
3 changes: 2 additions & 1 deletion test-fixtures/suite4/smithy/smithy-build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "1.0",
"maven": {
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.25.0", "software.amazon.smithy:smithy-waiters:1.25.0"],
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.40.0", "software.amazon.smithy:smithy-waiters:1.40.0"],
"repositories": [{ "url": "https://repo1.maven.org/maven2/" }]
}
}
3 changes: 2 additions & 1 deletion test-fixtures/suite5/smithy/smithy-build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "1.0",
"maven": {
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.25.0", "software.amazon.smithy:smithy-waiters:1.25.0"],
"dependencies": ["software.amazon.smithy:smithy-aws-traits:1.40.0", "software.amazon.smithy:smithy-waiters:1.40.0"],
"repositories": [{ "url": "https://repo1.maven.org/maven2/" }]
}
}
2 changes: 1 addition & 1 deletion tests/suite1/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ suite("Extension tests", () => {
assert.notEqual(doc, undefined);
assert.notEqual(editor, undefined);
assert.equal(ext.isActive, true);
assert.match(logText, /Downloaded external jars.*smithy-aws-traits-1\.25\.0\.jar/);
assert.match(logText, /Downloaded external jars.*smithy-aws-traits-1\.40\.0\.jar/);
assert.match(logText, /Discovered smithy files.*\/main.smithy]/);
assert.equal(diagnostics.length, 0);
}).timeout(10000);
Expand Down
4 changes: 2 additions & 2 deletions tests/suite2/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ suite("broken model tests", () => {
await waitForServerStartup();
const diagnostics = vscode.languages.getDiagnostics(smithyMainUri);

assert.match(diagnostics[0].message, /relationship to an unresolved shape `example.weather#GetCurrentTime`/);
assert.equal(diagnostics[0].range.start.line, 5);
assert.match(diagnostics[0].message, /Cannot apply `smithy.api#deprecated` to an immutable prelude shape/);
assert.equal(diagnostics[0].range.start.line, 4);
assert.equal(diagnostics[0].range.start.character, 0);
}).timeout(10000);
});

0 comments on commit 4c37661

Please sign in to comment.