Skip to content

Commit

Permalink
Fix #250 Support the --chmod flag in ADD instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Remy Suen <[email protected]>
  • Loading branch information
rcjsuen committed Jan 20, 2021
1 parent 6abf189 commit e2a056d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 52 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## [Unreleased]
### Added
- textDocument/publishDiagnostics
- support `--chmod` flag in ADD instructions added in Docker CE 20.10 ([#250](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/250))

## [0.2.2] - 2020-01-07
### Fixed
- import all types from vscode-languageserver to prevent bundling issues ([#249](https://github.com/rcjsuen/dockerfile-language-server-nodejs/issues/249))
Expand Down
57 changes: 7 additions & 50 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"node": "*"
},
"dependencies": {
"dockerfile-language-service": "0.1.1",
"dockerfile-utils": "0.1.1",
"dockerfile-language-service": "0.2.0",
"dockerfile-utils": "0.2.0",
"vscode-languageserver": "^7.0.0"
},
"devDependencies": {
Expand Down
26 changes: 26 additions & 0 deletions test/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,32 @@ describe("Dockerfile LSP Tests", function() {
lspProcess.on("message", semanticTokensListener);
});

it("issue #250", finished => {
this.timeout(5000);
sendNotification("textDocument/didOpen", {
textDocument: {
languageId: "dockerfile",
version: 1,
uri: "uri://dockerfile/250.txt",
text: "FROM scratch\nADD --chmod=644 . ."
}
});

lspProcess.once("message", json => {
if (json.method === "textDocument/publishDiagnostics") {
assert.equal(json.params.uri, "uri://dockerfile/250.txt");
console.log(json.params.diagnostics);
assert.equal(json.params.diagnostics.length, 0);
sendNotification("textDocument/didClose", {
textDocument: {
uri: "uri://dockerfile/250.txt"
}
});
finished();
}
});
});

function testInvalidFile(request: string, assertionCallback: Function) {
it(request, function(finished) {
this.timeout(5000);
Expand Down

0 comments on commit e2a056d

Please sign in to comment.