-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into repl
- Loading branch information
Showing
278 changed files
with
7,245 additions
and
4,094 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Tagged Production Deploys | ||
|
||
on: | ||
push: | ||
tags: | ||
- "svelte-check-*" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "12.x" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
# Ensure everything is compiling | ||
- run: "yarn install" | ||
- run: "yarn build" | ||
|
||
# Lets us use one-liner JSON manipulations the package.json files | ||
- run: "npm install -g json" | ||
|
||
# Setup the environment | ||
- run: 'json -I -f packages/svelte-check/package.json -e "this.version=\`${{ github.ref }}\`.split(\`-\`).pop()"' | ||
|
||
# Ship it | ||
- run: | | ||
cd packages/svelte-check | ||
npm install | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
packages/svelte2tsx/*.d.ts | ||
packages/svelte2tsx/test/** | ||
packages/svelte2tsx/test/*/samples/*/*sx | ||
packages/svelte2tsx/test/*/samples/*/*.svelte | ||
packages/svelte2tsx/test/sourcemaps/*.html | ||
packages/language-server/test/**/*.svelte | ||
packages/language-server/test/**/testfiles/**/*.ts | ||
packages/svelte-vscode/syntaxes/*.yaml | ||
.github/** | ||
packages/typescript-plugin/src/**/*.js | ||
packages/typescript-plugin/src/**/*.d.ts | ||
**/dist | ||
.github/** | ||
.history/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"typescript.preferences.quoteStyle": "single", | ||
"typescript.preferences.quoteStyle": "single" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { FSWatcher, watch } from 'chokidar'; | ||
import { join } from 'path'; | ||
import { DidChangeWatchedFilesParams, FileChangeType, FileEvent } from 'vscode-languageserver'; | ||
import { pathToUrl } from '../utils'; | ||
|
||
type DidChangeHandler = (para: DidChangeWatchedFilesParams) => void; | ||
|
||
export class FallbackWatcher { | ||
private readonly watcher: FSWatcher; | ||
private readonly callbacks: DidChangeHandler[] = []; | ||
|
||
constructor(glob: string, workspacePaths: string[]) { | ||
this.watcher = watch(workspacePaths.map((workspacePath) => join(workspacePath, glob))); | ||
|
||
this.watcher | ||
.on('add', (path) => this.callback(path, FileChangeType.Created)) | ||
.on('unlink', (path) => this.callback(path, FileChangeType.Deleted)) | ||
.on('change', (path) => this.callback(path, FileChangeType.Changed)); | ||
} | ||
|
||
private convert(path: string, type: FileChangeType): DidChangeWatchedFilesParams { | ||
const event: FileEvent = { | ||
type, | ||
uri: pathToUrl(path) | ||
}; | ||
|
||
return { | ||
changes: [event] | ||
}; | ||
} | ||
|
||
private callback(path: string, type: FileChangeType) { | ||
const para = this.convert(path, type); | ||
this.callbacks.forEach((callback) => callback(para)); | ||
} | ||
|
||
onDidChangeWatchedFiles(callback: DidChangeHandler) { | ||
this.callbacks.push(callback); | ||
} | ||
|
||
dispose() { | ||
this.watcher.close(); | ||
} | ||
} |
Oops, something went wrong.