Skip to content

Commit bd64e5d

Browse files
committed
Merge remote-tracking branch 'upstream' into gyb
2 parents 3406954 + a5e141a commit bd64e5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4443
-1621
lines changed

.eslintrc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@
66
"sourceType": "module",
77
"project": true
88
},
9-
"plugins": ["@typescript-eslint"],
9+
"plugins": ["@typescript-eslint", "mocha"],
1010
"rules": {
1111
"curly": "error",
1212
"eqeqeq": "warn",
1313
"no-throw-literal": "warn",
1414
// TODO "@typescript-eslint/semi" rule moved to https://eslint.style
1515
"semi": "error",
1616
"no-console": "warn",
17+
"mocha/no-exclusive-tests": "error",
18+
"no-restricted-syntax": [
19+
"error",
20+
{
21+
"selector": "CallExpression[callee.object.object.callee.name='tag'][callee.property.name='only']",
22+
"message": "Unexpected exclusive mocha test with tag().suite.only() or tag().test.only()"
23+
}
24+
],
1725
"@typescript-eslint/no-floating-promises": ["warn", { "checkThenables": true }],
1826
"@typescript-eslint/await-thenable": "warn",
1927
// Mostly fails tests, ex. expect(...).to.be.true returns a Chai.Assertion

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ updates:
2222
- dependency-name: "@types/svgicons2svgfont"
2323
- dependency-name: "octokit"
2424
update-types: ["version-update:semver-major"]
25+
- dependency-name: "eslint-plugin-mocha"
26+
update-types: ["version-update:semver-major"]
2527
# Newer versions of fantasticon are broken on Windows.
2628
# https://github.com/tancredi/fantasticon/issues/470
2729
- dependency-name: "fantasticon"

.github/workflows/nightly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Nightly
22

3+
permissions:
4+
contents: read
5+
36
on:
47
schedule:
58
- cron: "0 0 * * *"

.github/workflows/pull_request.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Pull request
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
types: [opened, reopened, synchronize]

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.org/

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
!assets/walkthrough/**
1313
!assets/documentation-webview/**
1414
!assets/swift-docc-render/**
15+
!assets/swift_askpass.sh
1516
!node_modules/@vscode/codicons/**
1617
!swift-gyb.language-configuration.json
1718
!syntaxes/**

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Prompt to cancel and replace the active test run if one is in flight ([#1774](https://github.com/swiftlang/vscode-swift/pull/1774))
1010
- A walkthrough for first time extension users ([#1560](https://github.com/swiftlang/vscode-swift/issues/1560))
1111
- Allow `swift.backgroundCompilation` setting to accept an object where enabling the `useDefaultTask` property will run the default build task, and the `release` property will run the `release` variant of the Build All task ([#1857](https://github.com/swiftlang/vscode-swift/pull/1857))
12+
- Added new `target` and `configuration` properties to `swift` launch configurations that can be used instead of `program` for SwiftPM based projects ([#1890](https://github.com/swiftlang/vscode-swift/pull/1890))
1213

1314
### Fixed
1415

assets/swift_askpass.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
VSCODE_SWIFT_ASKPASS_FILE=$(mktemp)
3+
4+
ELECTRON_RUN_AS_NODE="1" VSCODE_SWIFT_ASKPASS_FILE="$VSCODE_SWIFT_ASKPASS_FILE" "$VSCODE_SWIFT_ASKPASS_NODE" "$VSCODE_SWIFT_ASKPASS_MAIN"
5+
EXIT_CODE=$?
6+
7+
cat "$VSCODE_SWIFT_ASKPASS_FILE"
8+
rm "$VSCODE_SWIFT_ASKPASS_FILE"
9+
10+
exit "$EXIT_CODE"

assets/test/.vscode/launch.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"type": "swift",
55
"request": "launch",
66
"name": "Debug PackageExe (defaultPackage)",
7+
// Explicitly use "program" to test searching for launch configs by program.
78
"program": "${workspaceFolder:test}/defaultPackage/.build/debug/PackageExe",
89
"args": [],
910
"cwd": "${workspaceFolder:test}/defaultPackage",
@@ -15,7 +16,9 @@
1516
"type": "swift",
1617
"request": "launch",
1718
"name": "Release PackageExe (defaultPackage)",
18-
"program": "${workspaceFolder:test}/defaultPackage/.build/release/PackageExe",
19+
// Explicitly use "target" and "configuration" to test searching for launch configs by target.
20+
"target": "PackageExe",
21+
"configuration": "release",
1922
"args": [],
2023
"cwd": "${workspaceFolder:test}/defaultPackage",
2124
"preLaunchTask": "swift: Build Release PackageExe (defaultPackage)",

assets/test/.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"-Xswiftc",
88
"-DTEST_ARGUMENT_SET_VIA_TEST_BUILD_ARGUMENTS_SETTING"
99
],
10+
"swift.outputChannelLogLevel": "debug",
1011
"lldb.verboseLogging": true,
1112
"lldb.launch.terminal": "external",
1213
"lldb-dap.detachOnError": true,

0 commit comments

Comments
 (0)