Remove now unused library.

This commit is contained in:
Jason Reed
2020-07-14 08:19:45 -04:00
parent ac941eb9dd
commit 53d5c2438a
12 changed files with 1 additions and 300 deletions

View File

@@ -2,7 +2,6 @@ dependencies:
'@microsoft/node-core-library': 3.13.0
'@microsoft/rush-lib': 5.20.0
'@rush-temp/codeql-gulp-tasks': 'file:projects/codeql-gulp-tasks.tgz'
'@rush-temp/codeql-vscode-utils': 'file:projects/codeql-vscode-utils.tgz_typescript@3.8.3'
'@rush-temp/typescript-config': 'file:projects/typescript-config.tgz'
'@rush-temp/vscode-codeql': 'file:projects/vscode-codeql.tgz'
'@types/chai': 4.2.11
@@ -7994,20 +7993,6 @@ packages:
integrity: sha512-VdaBVV0JiXUYF9fe/mQ5WdbkIAjDfp1/cf35hhmNvfuSwplDtHwvx9bCrbZZ6yElnXSE3jJ04Q4HFEAzxxNYPw==
tarball: 'file:projects/codeql-gulp-tasks.tgz'
version: 0.0.0
'file:projects/codeql-vscode-utils.tgz_typescript@3.8.3':
dependencies:
'@types/node': 12.12.30
'@types/vscode': 1.43.0
typescript-formatter: 7.2.2_typescript@3.8.3
dev: false
id: 'file:projects/codeql-vscode-utils.tgz'
name: '@rush-temp/codeql-vscode-utils'
peerDependencies:
typescript: '*'
resolution:
integrity: sha512-BfGUKj2eXAnv7+rYYMRAJdj6MGNCD4a+wwemyf9tfE8kXO2ghWbey/fqA8dy6qT8KE8tAokEVkuN6WjPLdMHqg==
tarball: 'file:projects/codeql-vscode-utils.tgz'
version: 0.0.0
'file:projects/typescript-config.tgz':
dev: false
name: '@rush-temp/typescript-config'
@@ -8096,7 +8081,7 @@ packages:
dev: false
name: '@rush-temp/vscode-codeql'
resolution:
integrity: sha512-pzIN497d6Ht6VQHUdB90HFRVzzgFNQ71WLudM/L7P0QgsQtRuaLk9WVEcWMz/3124F7NiFa3SpC/THbN5Cc9aw==
integrity: sha512-OY56IxlQ6n13pIkGoNB1XKLRCNrXalmVhvdB+dHR46QgAAzquskFURs+ZVZjFptVSjtrlFqkFKZUtAdNdwD5xQ==
tarball: 'file:projects/vscode-codeql.tgz'
version: 0.0.0
registry: ''
@@ -8104,7 +8089,6 @@ specifiers:
'@microsoft/node-core-library': ~3.13.0
'@microsoft/rush-lib': ~5.20.0
'@rush-temp/codeql-gulp-tasks': 'file:./projects/codeql-gulp-tasks.tgz'
'@rush-temp/codeql-vscode-utils': 'file:./projects/codeql-vscode-utils.tgz'
'@rush-temp/typescript-config': 'file:./projects/typescript-config.tgz'
'@rush-temp/vscode-codeql': 'file:./projects/vscode-codeql.tgz'
'@types/chai': ^4.1.7

View File

@@ -600,7 +600,6 @@
"node-fetch": "~2.6.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"@github/codeql-vscode-utils": "^0.0.4",
"tmp": "^0.1.0",
"tree-kill": "~1.2.2",
"unzipper": "~0.10.5",

View File

@@ -1,56 +0,0 @@
{
"name": "@github/codeql-vscode-utils",
"entries": [
{
"version": "0.0.4",
"tag": "@github/codeql-vscode-utils_v0.0.4",
"date": "Tue, 09 Jun 2020 13:58:46 GMT",
"comments": {
"patch": [
{
"comment": "Update dependencies."
}
],
"dependency": [
{
"comment": "Updating dependency \"@github/codeql-gulp-tasks\" from `^0.0.3` to `^0.0.4`"
}
]
}
},
{
"version": "0.0.3",
"tag": "@github/codeql-vscode-utils_v0.0.3",
"date": "Sat, 06 Jun 2020 06:54:45 GMT",
"comments": {
"patch": [
{
"comment": "Removed unnecessary dependency on `typescript`"
}
],
"dependency": [
{
"comment": "Updating dependency \"@github/codeql-build-tasks\" from `^0.0.2` to `^0.0.3`"
}
]
}
},
{
"version": "0.0.2",
"tag": "@github/codeql-vscode-utils_v0.0.2",
"date": "Fri, 05 Jun 2020 21:52:18 GMT",
"comments": {
"patch": [
{
"comment": "Initial configuration for publishing"
}
],
"dependency": [
{
"comment": "Updating dependency \"@github/codeql-build-tasks\" from `^0.0.1` to `^0.0.2`"
}
]
}
}
]
}

View File

@@ -1,25 +0,0 @@
# Change Log - @github/codeql-vscode-utils
This log was last generated on Tue, 09 Jun 2020 13:58:46 GMT and should not be manually modified.
## 0.0.4
Tue, 09 Jun 2020 13:58:46 GMT
### Patches
- Update dependencies.
## 0.0.3
Sat, 06 Jun 2020 06:54:45 GMT
### Patches
- Removed unnecessary dependency on `typescript`
## 0.0.2
Fri, 05 Jun 2020 21:52:18 GMT
### Patches
- Initial configuration for publishing

View File

@@ -1,7 +0,0 @@
'use strict';
require('ts-node').register({});
const { compileTypeScript, watchTypeScript } = require('@github/codeql-gulp-tasks');
exports.default = compileTypeScript;
exports.watchTypeScript = watchTypeScript;

View File

@@ -1,27 +0,0 @@
{
"name": "@github/codeql-vscode-utils",
"description": "Shared utilities for writing Visual Studio Code extensions",
"author": "GitHub",
"private": false,
"version": "0.0.4",
"publisher": "GitHub",
"repository": {
"type": "git",
"url": "https://github.com/github/codeql-coreql-team.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"main": "./out/index",
"scripts": {
"build": "gulp",
"format": "tsfmt -r"
},
"devDependencies": {
"@github/codeql-gulp-tasks": "^0.0.4",
"@types/node": "^12.0.8",
"@types/vscode": "^1.39.0",
"typescript-config": "^0.0.1",
"typescript-formatter": "^7.2.2"
}
}

View File

@@ -1,63 +0,0 @@
import { Disposable } from "vscode";
/**
* Base class to make it easier to implement a `Disposable` that owns other disposable object.
*/
export abstract class DisposableObject implements Disposable {
private disposables: Disposable[] = [];
private tracked?: Set<Disposable> = undefined;
constructor() {
}
/**
* Adds `obj` to a list of objects to dispose when `this` is disposed. Objects added by `push` are
* disposed in reverse order of being added.
* @param obj The object to take ownership of.
*/
protected push<T extends Disposable>(obj: T): T {
if (obj !== undefined) {
this.disposables.push(obj);
}
return obj;
}
/**
* Adds `obj` to a set of objects to dispose when `this` is disposed. Objects added by
* `track` are disposed in an unspecified order.
* @param obj The object to track.
*/
protected track<T extends Disposable>(obj: T): T {
if (obj !== undefined) {
if (this.tracked === undefined) {
this.tracked = new Set<Disposable>();
}
this.tracked.add(obj);
}
return obj;
}
/**
* Removes `obj`, which must have been previously added by `track`, from the set of objects to
* dispose when `this` is disposed. `obj` itself is disposed.
* @param obj The object to stop tracking.
*/
protected disposeAndStopTracking(obj: Disposable): void {
if (obj !== undefined) {
this.tracked!.delete(obj);
obj.dispose();
}
}
public dispose() {
if (this.tracked !== undefined) {
for (const trackedObject of this.tracked.values()) {
trackedObject.dispose();
}
this.tracked = undefined;
}
while (this.disposables.length > 0) {
this.disposables.pop()!.dispose();
}
}
}

View File

@@ -1,4 +0,0 @@
export * from './disposable-object';
export * from './multi-file-system-watcher';
export * from './ui-service';

View File

@@ -1,65 +0,0 @@
import { DisposableObject } from './disposable-object';
import { EventEmitter, Event, Uri, GlobPattern, workspace } from 'vscode';
/**
* A collection of `FileSystemWatcher` objects. Disposing this object disposes all of the individual
* `FileSystemWatcher` objects and their event registrations.
*/
class WatcherCollection extends DisposableObject {
constructor() {
super();
}
/**
* Create a `FileSystemWatcher` and add it to the collection.
* @param pattern The pattern to watch.
* @param listener The event listener to be invoked when a watched file is created, changed, or
* deleted.
* @param thisArgs The `this` argument for the event listener.
*/
public addWatcher(pattern: GlobPattern, listener: (e: Uri) => any, thisArgs: any): void {
const watcher = workspace.createFileSystemWatcher(pattern);
this.push(watcher.onDidCreate(listener, thisArgs));
this.push(watcher.onDidChange(listener, thisArgs));
this.push(watcher.onDidDelete(listener, thisArgs));
}
}
/**
* A class to watch multiple patterns in the file system at the same time, reporting all
* notifications via a single event.
*/
export class MultiFileSystemWatcher extends DisposableObject {
private readonly _onDidChange = this.push(new EventEmitter<Uri>());
private watchers = this.track(new WatcherCollection());
constructor() {
super();
}
/**
* Event to be fired when any watched file is created, changed, or deleted.
*/
public get onDidChange(): Event<Uri> { return this._onDidChange.event; }
/**
* Adds a new pattern to watch.
* @param pattern The pattern to watch.
*/
public addWatch(pattern: GlobPattern): void {
this.watchers.addWatcher(pattern, this.handleDidChange, this);
}
/**
* Deletes all existing watchers.
*/
public clear(): void {
this.disposeAndStopTracking(this.watchers);
this.watchers = this.track(new WatcherCollection());
}
private handleDidChange(uri: Uri): void {
this._onDidChange.fire(uri);
}
}

View File

@@ -1,27 +0,0 @@
import { commands, TreeDataProvider, window } from 'vscode';
import { DisposableObject } from './disposable-object';
/**
* A VS Code service that interacts with the UI, including handling commands.
*/
export class UIService extends DisposableObject {
protected constructor() {
super();
}
/**
* Registers a command handler with Visual Studio Code.
* @param command The ID of the command to register.
* @param callback Callback function to implement the command.
* @remarks The command handler is automatically unregistered when the service is disposed.
*/
protected registerCommand(command: string, callback: (...args: any[]) => any): void {
this.push(commands.registerCommand(command, callback, this));
}
protected registerTreeDataProvider<T>(viewId: string, treeDataProvider: TreeDataProvider<T>):
void {
this.push(window.registerTreeDataProvider<T>(viewId, treeDataProvider));
}
}

View File

@@ -1,3 +0,0 @@
{
"extends": "./node_modules/typescript-config/lib.tsconfig.json"
}

View File

@@ -35,11 +35,6 @@
"projectFolder": "tools/build-tasks",
"versionPolicyName": "utilities"
},
{
"packageName": "@github/codeql-vscode-utils",
"projectFolder": "lib/semmle-vscode-utils",
"versionPolicyName": "utilities"
},
{
"packageName": "vscode-codeql",
"projectFolder": "extensions/ql-vscode"