Merge pull request #432 from dbartol/dbartol/utilities
Make a few internal packages publishable
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -17,7 +17,7 @@
|
||||
"${workspaceRoot}/dist/vscode-codeql/node_modules/semmle-bqrs/out/**/*.js",
|
||||
"${workspaceRoot}/dist/vscode-codeql/node_modules/semmle-io/out/**/*.js",
|
||||
"${workspaceRoot}/dist/vscode-codeql/node_modules/semmle-io-node/out/**/*.js",
|
||||
"${workspaceRoot}/dist/vscode-codeql/node_modules/semmle-vscode-utils/out/**/*.js"
|
||||
"${workspaceRoot}/dist/vscode-codeql/node_modules/@github/codeql-vscode-utils/out/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "Build"
|
||||
},
|
||||
|
||||
64
common/config/rush/pnpm-lock.yaml
generated
64
common/config/rush/pnpm-lock.yaml
generated
@@ -1,11 +1,11 @@
|
||||
dependencies:
|
||||
'@microsoft/node-core-library': 3.13.0
|
||||
'@microsoft/rush-lib': 5.20.0
|
||||
'@rush-temp/build-tasks': 'file:projects/build-tasks.tgz_glob@7.1.6'
|
||||
'@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/semmle-bqrs': 'file:projects/semmle-bqrs.tgz_typescript@3.8.3'
|
||||
'@rush-temp/semmle-io': 'file:projects/semmle-io.tgz_typescript@3.8.3'
|
||||
'@rush-temp/semmle-io-node': 'file:projects/semmle-io-node.tgz_typescript@3.8.3'
|
||||
'@rush-temp/semmle-vscode-utils': 'file:projects/semmle-vscode-utils.tgz'
|
||||
'@rush-temp/typescript-config': 'file:projects/typescript-config.tgz'
|
||||
'@rush-temp/vscode-codeql': 'file:projects/vscode-codeql.tgz'
|
||||
'@types/chai': 4.2.11
|
||||
@@ -1444,6 +1444,10 @@ packages:
|
||||
node: '>=0.2.0'
|
||||
resolution:
|
||||
integrity: sha1-skV5w77U1tOWru5tmorn9Ugqt7s=
|
||||
/build-tasks/0.0.1:
|
||||
dev: false
|
||||
resolution:
|
||||
integrity: sha1-uriieUZPproUpWCkPbYhSbgpQJg=
|
||||
/builtin-modules/3.1.0:
|
||||
dev: false
|
||||
engines:
|
||||
@@ -7818,7 +7822,7 @@ packages:
|
||||
commander: 2.20.3
|
||||
resolution:
|
||||
integrity: sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw==
|
||||
'file:projects/build-tasks.tgz_glob@7.1.6':
|
||||
'file:projects/codeql-gulp-tasks.tgz':
|
||||
dependencies:
|
||||
'@microsoft/node-core-library': 3.13.0
|
||||
'@microsoft/rush-lib': 5.20.0
|
||||
@@ -7833,6 +7837,7 @@ packages:
|
||||
ansi-colors: 4.1.1
|
||||
child-process-promise: 2.2.1
|
||||
fs-extra: 8.1.0
|
||||
glob: 7.1.6
|
||||
glob-promise: 3.4.0_glob@7.1.6
|
||||
gulp: 4.0.2
|
||||
gulp-sourcemaps: 2.6.5
|
||||
@@ -7846,17 +7851,29 @@ packages:
|
||||
typescript-formatter: 7.2.2_typescript@3.8.3
|
||||
vinyl: 2.2.0
|
||||
dev: false
|
||||
id: 'file:projects/build-tasks.tgz'
|
||||
name: '@rush-temp/build-tasks'
|
||||
peerDependencies:
|
||||
glob: '*'
|
||||
name: '@rush-temp/codeql-gulp-tasks'
|
||||
resolution:
|
||||
integrity: sha512-14DvfY6Fj3HXp2/CNJ2zNh9MA8zPw9mUcr8WqkSsYvJow7JMcIlJ//OOONwpoSWtfrk1bk6Cin7jj9H79ItHQQ==
|
||||
tarball: 'file:projects/build-tasks.tgz'
|
||||
integrity: sha512-eWHB3hxiYH/b5wdcG0S1CqTBmqtNTu3VVvdEo/qrZxMoPVfXOT630ocQ8CxrqTfT1kyx1ZpKoqzzaR0hxgDqCg==
|
||||
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-OC9Yx7t16ZzrGmGu1MIV8H4A2RZRFaNonIwQqlWEJ56LGVkNL+gX0RxAPwtT76AbEzhsyb4VUQ609QRt98rPlw==
|
||||
tarball: 'file:projects/codeql-vscode-utils.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/semmle-bqrs.tgz_typescript@3.8.3':
|
||||
dependencies:
|
||||
'@types/node': 12.12.30
|
||||
build-tasks: 0.0.1
|
||||
leb: 0.3.0
|
||||
reflect-metadata: 0.1.13
|
||||
typescript-formatter: 7.2.2_typescript@3.8.3
|
||||
@@ -7866,13 +7883,14 @@ packages:
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
resolution:
|
||||
integrity: sha512-24GdnvMbGfQIWMfgDhift+kYJDnG7dX03NrpX4ajZ2rckteysvq2/K7XI1OXGvUuqrt3m0/+GRDHpSI9XKDJJA==
|
||||
integrity: sha512-l46HYR+5UlVb0XIQMNRBjADvVVzFolw3KrPPHuIRWEXhkdnFXLTOHEXBFcnijNZIduePBNqPrII+wqMmRcJVvg==
|
||||
tarball: 'file:projects/semmle-bqrs.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/semmle-io-node.tgz_typescript@3.8.3':
|
||||
dependencies:
|
||||
'@types/fs-extra': 8.1.0
|
||||
'@types/node': 12.12.30
|
||||
build-tasks: 0.0.1
|
||||
fs-extra: 8.1.0
|
||||
typescript-formatter: 7.2.2_typescript@3.8.3
|
||||
dev: false
|
||||
@@ -7881,12 +7899,13 @@ packages:
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
resolution:
|
||||
integrity: sha512-Bj0ax/bASrHV7tamOuXZZdd3UOB4NBKdjdszIRaDvDRTu8RlEst+TVoUhkfy30qb2/6ePp3/juOJyyiBJN7u8Q==
|
||||
integrity: sha512-O034F8DYa59REsFjAeP4qxtoGBslO8RiGJK8bdMaxWqOX52IJyVqx6ybNgz3cWzX0Q+KI3UjZTCdk3vvF+Wsbg==
|
||||
tarball: 'file:projects/semmle-io-node.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/semmle-io.tgz_typescript@3.8.3':
|
||||
dependencies:
|
||||
'@types/node': 12.12.30
|
||||
build-tasks: 0.0.1
|
||||
leb: 0.3.0
|
||||
typescript-formatter: 7.2.2_typescript@3.8.3
|
||||
dev: false
|
||||
@@ -7895,26 +7914,14 @@ packages:
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
resolution:
|
||||
integrity: sha512-NtyviDSevxbd+hj4J66LucOzo8LU2hJ1Jh0eHw0Qu3tRZPUT8HcQlseyy29AvZR8n8eppfEZiAm/JdiHfmRPMA==
|
||||
integrity: sha512-40cXVM0J2z7vTtvon31m8QAd/W7c3P4yLqpoGnbtLcmb2/1d881IdZbe/8dMsUOor/Qv/VsxcL9ndz+Av+eClw==
|
||||
tarball: 'file:projects/semmle-io.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/semmle-vscode-utils.tgz':
|
||||
dependencies:
|
||||
'@types/node': 12.12.30
|
||||
'@types/vscode': 1.43.0
|
||||
typescript: 3.8.3
|
||||
typescript-formatter: 7.2.2_typescript@3.8.3
|
||||
dev: false
|
||||
name: '@rush-temp/semmle-vscode-utils'
|
||||
resolution:
|
||||
integrity: sha512-5y5r8SDoN9Fp44naC9gUe8rOexeckXg2T0h9QCJAIcEgnFqOxzRc6Rv9gbMUStFKNh+rFlvmYmgPAdg5QkfgUg==
|
||||
tarball: 'file:projects/semmle-vscode-utils.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/typescript-config.tgz':
|
||||
dev: false
|
||||
name: '@rush-temp/typescript-config'
|
||||
resolution:
|
||||
integrity: sha512-XuUIySaNoooIduvehnlKYaHqZJmmQoCqB1RtKhNszjCYZaSSJAnKVucViWBf5oNLKSNP7NchrD7gcoBlQ3xYvw==
|
||||
integrity: sha512-kSFyvKy63jUHFVXQEzALiYfsTdn7J+Y7PcqtUVo9GndU5b5Xh3rBpVbZD1QN8+y8GfT0m/sdZZQVyH0h+On11Q==
|
||||
tarball: 'file:projects/typescript-config.tgz'
|
||||
version: 0.0.0
|
||||
'file:projects/vscode-codeql.tgz':
|
||||
@@ -7946,6 +7953,7 @@ packages:
|
||||
'@types/xml2js': 0.4.5
|
||||
'@typescript-eslint/eslint-plugin': 2.23.0_2510d86781fe783b47b58303c18a0d9b
|
||||
'@typescript-eslint/parser': 2.23.0_eslint@6.8.0+typescript@3.8.3
|
||||
build-tasks: 0.0.1
|
||||
chai: 4.2.0
|
||||
chai-as-promised: 7.1.1_chai@4.2.0
|
||||
child-process-promise: 2.2.1
|
||||
@@ -7995,18 +8003,18 @@ packages:
|
||||
dev: false
|
||||
name: '@rush-temp/vscode-codeql'
|
||||
resolution:
|
||||
integrity: sha512-bU6tGSUD6TzMa6XDiDymvfY28xtDKp6uYPVCwiy7zdsl5NYUxph5Yua0Snoam7oytdYMa2HieTn8Lh6Hkb5P/A==
|
||||
integrity: sha512-oGd4/XeaRctrSAFlpSZ3yhqnaTUQ6ZT2gi5iVuDWAB4FMiwJ2RCk/eFPlXrI6d+cl3l9wKHgCQeaLsbx2BfWjw==
|
||||
tarball: 'file:projects/vscode-codeql.tgz'
|
||||
version: 0.0.0
|
||||
registry: ''
|
||||
specifiers:
|
||||
'@microsoft/node-core-library': ~3.13.0
|
||||
'@microsoft/rush-lib': ~5.20.0
|
||||
'@rush-temp/build-tasks': 'file:./projects/build-tasks.tgz'
|
||||
'@rush-temp/codeql-gulp-tasks': 'file:./projects/codeql-gulp-tasks.tgz'
|
||||
'@rush-temp/codeql-vscode-utils': 'file:./projects/codeql-vscode-utils.tgz'
|
||||
'@rush-temp/semmle-bqrs': 'file:./projects/semmle-bqrs.tgz'
|
||||
'@rush-temp/semmle-io': 'file:./projects/semmle-io.tgz'
|
||||
'@rush-temp/semmle-io-node': 'file:./projects/semmle-io-node.tgz'
|
||||
'@rush-temp/semmle-vscode-utils': 'file:./projects/semmle-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
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
* This is configuration file is used for advanced publishing configurations with Rush.
|
||||
* For full documentation, please see https://rushjs.io/pages/configs/version_policies_json/
|
||||
*/
|
||||
|
||||
[]
|
||||
[
|
||||
{
|
||||
"definitionName": "individualVersion",
|
||||
"policyName": "utilities"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -9,7 +9,7 @@ const {
|
||||
compileTextMateGrammar,
|
||||
copyTestData,
|
||||
copyViewCss
|
||||
} = require('build-tasks');
|
||||
} = require('@github/codeql-gulp-tasks');
|
||||
const { compileView } = require('./webpack');
|
||||
|
||||
exports.buildWithoutPackage = gulp.parallel(compileTypeScript, compileTextMateGrammar, compileView, copyTestData, copyViewCss);
|
||||
|
||||
@@ -582,7 +582,7 @@
|
||||
"react-dom": "^16.8.6",
|
||||
"semmle-bqrs": "^0.0.1",
|
||||
"semmle-io-node": "^0.0.1",
|
||||
"semmle-vscode-utils": "^0.0.1",
|
||||
"@github/codeql-vscode-utils": "^0.0.4",
|
||||
"tmp": "^0.1.0",
|
||||
"tree-kill": "~1.2.2",
|
||||
"unzipper": "~0.10.5",
|
||||
@@ -615,7 +615,7 @@
|
||||
"@types/vscode": "^1.39.0",
|
||||
"@types/webpack": "^4.32.1",
|
||||
"@types/xml2js": "~0.4.4",
|
||||
"build-tasks": "^0.0.1",
|
||||
"@github/codeql-gulp-tasks": "^0.0.4",
|
||||
"chai": "^4.2.0",
|
||||
"css-loader": "~3.1.0",
|
||||
"glob": "^7.1.4",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DisposableObject } from 'semmle-vscode-utils';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils';
|
||||
import { workspace, Event, EventEmitter, ConfigurationChangeEvent, ConfigurationTarget } from 'vscode';
|
||||
import { DistributionManager } from './distribution';
|
||||
import { logger } from './logging';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as path from 'path';
|
||||
import { DisposableObject } from 'semmle-vscode-utils';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils';
|
||||
import { commands, Event, EventEmitter, ExtensionContext, ProviderResult, TreeDataProvider, TreeItem, Uri, window, env } from 'vscode';
|
||||
import * as cli from './cli';
|
||||
import { DatabaseItem, DatabaseManager, getUpgradesDirectories } from './databases';
|
||||
|
||||
@@ -6,7 +6,7 @@ import * as cli from './cli';
|
||||
import { ExtensionContext } from 'vscode';
|
||||
import { showAndLogErrorMessage, showAndLogWarningMessage, showAndLogInformationMessage } from './helpers';
|
||||
import { zipArchiveScheme, encodeSourceArchiveUri, decodeSourceArchiveUri } from './archive-filesystem-provider';
|
||||
import { DisposableObject } from 'semmle-vscode-utils';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils';
|
||||
import { QueryServerConfig } from './config';
|
||||
import { Logger, logger } from './logging';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DisposableObject } from 'semmle-vscode-utils';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils';
|
||||
|
||||
/**
|
||||
* Base class for "discovery" operations, which scan the file system to find specific kinds of
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as crypto from 'crypto';
|
||||
import * as path from 'path';
|
||||
import * as Sarif from 'sarif';
|
||||
import { FivePartLocation, LocationStyle, LocationValue, ResolvableLocationValue, tryGetResolvableLocation, WholeFileLocation } from 'semmle-bqrs';
|
||||
import { DisposableObject } from 'semmle-vscode-utils';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils';
|
||||
import * as vscode from 'vscode';
|
||||
import { Diagnostic, DiagnosticRelatedInformation, DiagnosticSeverity, languages, Location, Range, Uri, window as Window, workspace } from 'vscode';
|
||||
import * as cli from './cli';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { window as Window, OutputChannel, Progress, Disposable } from 'vscode';
|
||||
import { DisposableObject } from 'semmle-vscode-utils';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EventEmitter, Event, Uri, WorkspaceFolder, RelativePattern } from 'vscode';
|
||||
import { MultiFileSystemWatcher } from 'semmle-vscode-utils';
|
||||
import { MultiFileSystemWatcher } from '@github/codeql-vscode-utils';
|
||||
import { CodeQLCliServer, QlpacksInfo } from './cli';
|
||||
import { Discovery } from './discovery';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as path from 'path';
|
||||
import { QLPackDiscovery } from './qlpack-discovery';
|
||||
import { Discovery } from './discovery';
|
||||
import { EventEmitter, Event, Uri, RelativePattern } from 'vscode';
|
||||
import { MultiFileSystemWatcher } from 'semmle-vscode-utils';
|
||||
import { MultiFileSystemWatcher } from '@github/codeql-vscode-utils';
|
||||
import { CodeQLCliServer } from './cli';
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as cp from 'child_process';
|
||||
import * as path from 'path';
|
||||
// Import from the specific module within `semmle-vscode-utils`, rather than via `index.ts`, because
|
||||
// we avoid taking an accidental runtime dependency on `vscode` this way.
|
||||
import { DisposableObject } from 'semmle-vscode-utils/out/disposable-object';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils/out/disposable-object';
|
||||
import { Disposable } from 'vscode';
|
||||
import { CancellationToken, createMessageConnection, MessageConnection, RequestType } from 'vscode-jsonrpc';
|
||||
import * as cli from './cli';
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import { TestAdapterRegistrar } from 'vscode-test-adapter-util';
|
||||
import { QLTestFile, QLTestNode, QLTestDirectory, QLTestDiscovery } from './qltest-discovery';
|
||||
import { Event, EventEmitter, CancellationTokenSource, CancellationToken } from 'vscode';
|
||||
import { DisposableObject } from 'semmle-vscode-utils';
|
||||
import { DisposableObject } from '@github/codeql-vscode-utils';
|
||||
import { QLPackDiscovery } from './qlpack-discovery';
|
||||
import { CodeQLCliServer } from './cli';
|
||||
import { getOnDiskWorkspaceFolders } from './helpers';
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import { Uri, TextDocumentShowOptions, commands, window } from 'vscode';
|
||||
import { TestTreeNode } from './test-tree-node';
|
||||
import { DisposableObject, UIService } from 'semmle-vscode-utils';
|
||||
import { DisposableObject, UIService } from '@github/codeql-vscode-utils';
|
||||
import { TestHub, TestController, TestAdapter, TestRunStartedEvent, TestRunFinishedEvent, TestEvent, TestSuiteEvent } from 'vscode-test-adapter-api';
|
||||
import { QLTestAdapter, getExpectedFile, getActualFile } from './test-adapter';
|
||||
import { logger } from './logging';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
require('ts-node').register({});
|
||||
const { compileTypeScript, watchTypeScript } = require('build-tasks');
|
||||
const { compileTypeScript, watchTypeScript } = require('@github/codeql-gulp-tasks');
|
||||
|
||||
exports.default = compileTypeScript;
|
||||
exports.watchTypeScript = watchTypeScript;
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.0.8",
|
||||
"build-tasks": "^0.0.1",
|
||||
"@github/codeql-gulp-tasks": "^0.0.4",
|
||||
"typescript-config": "^0.0.1",
|
||||
"typescript-formatter": "^7.2.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
require('ts-node').register({});
|
||||
const { compileTypeScript, watchTypeScript } = require('build-tasks');
|
||||
const { compileTypeScript, watchTypeScript } = require('@github/codeql-gulp-tasks');
|
||||
|
||||
exports.default = compileTypeScript;
|
||||
exports.watchTypeScript = watchTypeScript;
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^8.0.0",
|
||||
"@types/node": "^12.0.8",
|
||||
"build-tasks": "^0.0.1",
|
||||
"@github/codeql-gulp-tasks": "^0.0.4",
|
||||
"typescript-config": "^0.0.1",
|
||||
"typescript-formatter": "^7.2.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
require('ts-node').register({});
|
||||
const { compileTypeScript, watchTypeScript } = require('build-tasks');
|
||||
const { compileTypeScript, watchTypeScript } = require('@github/codeql-gulp-tasks');
|
||||
|
||||
exports.default = compileTypeScript;
|
||||
exports.watchTypeScript = watchTypeScript;
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^12.0.8",
|
||||
"build-tasks": "^0.0.1",
|
||||
"@github/codeql-gulp-tasks": "^0.0.4",
|
||||
"typescript-config": "^0.0.1",
|
||||
"typescript-formatter": "^7.2.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
56
lib/semmle-vscode-utils/CHANGELOG.json
Normal file
56
lib/semmle-vscode-utils/CHANGELOG.json
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"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`"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
25
lib/semmle-vscode-utils/CHANGELOG.md
Normal file
25
lib/semmle-vscode-utils/CHANGELOG.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
require('ts-node').register({});
|
||||
const { compileTypeScript, watchTypeScript } = require('build-tasks');
|
||||
const { compileTypeScript, watchTypeScript } = require('@github/codeql-gulp-tasks');
|
||||
|
||||
exports.default = compileTypeScript;
|
||||
exports.watchTypeScript = watchTypeScript;
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
{
|
||||
"name": "semmle-vscode-utils",
|
||||
"name": "@github/codeql-vscode-utils",
|
||||
"description": "Shared utilities for writing Visual Studio Code extensions",
|
||||
"author": "GitHub",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"private": false,
|
||||
"version": "0.0.4",
|
||||
"publisher": "GitHub",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/github/vscode-codeql"
|
||||
"url": "https://github.com/github/codeql-coreql-team.git"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com/"
|
||||
},
|
||||
"main": "./out/index",
|
||||
"scripts": {
|
||||
@@ -15,12 +18,10 @@
|
||||
"format": "tsfmt -r"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@github/codeql-gulp-tasks": "^0.0.4",
|
||||
"@types/node": "^12.0.8",
|
||||
"@types/vscode": "^1.39.0",
|
||||
"build-tasks": "^0.0.1",
|
||||
"typescript": "^3.7.2",
|
||||
"typescript-config": "^0.0.1",
|
||||
"typescript-formatter": "^7.2.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
rush.json
15
rush.json
@@ -16,7 +16,7 @@
|
||||
"projectFolderMaxDepth": 2,
|
||||
"gitPolicy": {},
|
||||
"repository": {
|
||||
"url": "https://github.com/github/vscode-codeql"
|
||||
"url": "https://github.com/github/vscode-codeql.git"
|
||||
},
|
||||
"eventHooks": {
|
||||
"preRushInstall": [],
|
||||
@@ -31,8 +31,9 @@
|
||||
"projectFolder": "configs/typescript-config"
|
||||
},
|
||||
{
|
||||
"packageName": "build-tasks",
|
||||
"projectFolder": "tools/build-tasks"
|
||||
"packageName": "@github/codeql-gulp-tasks",
|
||||
"projectFolder": "tools/build-tasks",
|
||||
"versionPolicyName": "utilities"
|
||||
},
|
||||
{
|
||||
"packageName": "semmle-bqrs",
|
||||
@@ -47,13 +48,13 @@
|
||||
"projectFolder": "lib/semmle-io-node"
|
||||
},
|
||||
{
|
||||
"packageName": "semmle-vscode-utils",
|
||||
"projectFolder": "lib/semmle-vscode-utils"
|
||||
"packageName": "@github/codeql-vscode-utils",
|
||||
"projectFolder": "lib/semmle-vscode-utils",
|
||||
"versionPolicyName": "utilities"
|
||||
},
|
||||
{
|
||||
"packageName": "vscode-codeql",
|
||||
"projectFolder": "extensions/ql-vscode",
|
||||
"shouldPublish": true
|
||||
"projectFolder": "extensions/ql-vscode"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
41
tools/build-tasks/CHANGELOG.json
Normal file
41
tools/build-tasks/CHANGELOG.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "@github/codeql-gulp-tasks",
|
||||
"entries": [
|
||||
{
|
||||
"version": "0.0.4",
|
||||
"tag": "@github/codeql-gulp-tasks_v0.0.4",
|
||||
"date": "Tue, 09 Jun 2020 13:58:46 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Support packages from multiple registries when packaging an extension."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.0.3",
|
||||
"tag": "@github/codeql-build-tasks_v0.0.3",
|
||||
"date": "Sat, 06 Jun 2020 06:54:45 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Added missing dependency on `glob`"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "0.0.2",
|
||||
"tag": "@github/codeql-build-tasks_v0.0.2",
|
||||
"date": "Fri, 05 Jun 2020 21:52:18 GMT",
|
||||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Initial configuration for publishing"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
25
tools/build-tasks/CHANGELOG.md
Normal file
25
tools/build-tasks/CHANGELOG.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Change Log - @github/codeql-gulp-tasks
|
||||
|
||||
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
|
||||
|
||||
- Support packages from multiple registries when packaging an extension.
|
||||
|
||||
## 0.0.3
|
||||
Sat, 06 Jun 2020 06:54:45 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Added missing dependency on `glob`
|
||||
|
||||
## 0.0.2
|
||||
Fri, 05 Jun 2020 21:52:18 GMT
|
||||
|
||||
### Patches
|
||||
|
||||
- Initial configuration for publishing
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
{
|
||||
"name": "build-tasks",
|
||||
"name": "@github/codeql-gulp-tasks",
|
||||
"description": "Internal Gulp tasks",
|
||||
"author": "GitHub",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"private": false,
|
||||
"version": "0.0.4",
|
||||
"publisher": "GitHub",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/github/vscode-codeql"
|
||||
"url": "https://github.com/github/codeql-coreql-team.git"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com/"
|
||||
},
|
||||
"main": "./out/index",
|
||||
"scripts": {
|
||||
@@ -20,6 +23,7 @@
|
||||
"ansi-colors": "^4.0.1",
|
||||
"child-process-promise": "^2.2.1",
|
||||
"fs-extra": "^8.1.0",
|
||||
"glob": "^7.1.4",
|
||||
"glob-promise": "^3.4.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-sourcemaps": "^2.6.5",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as fs from 'fs-extra';
|
||||
import * as glob from 'glob-promise';
|
||||
import * as jsonc from 'jsonc-parser';
|
||||
import { Shrinkwrap, ShrinkwrapPackage } from './pnpm';
|
||||
import * as path from 'path';
|
||||
@@ -22,10 +23,30 @@ const peerDependencyVersionPattern = /^\/((?:@(?:[^\/]+)\/)?[^\/]+)\/([^\/]+)\//
|
||||
export class RushContext {
|
||||
private shrinkwrap?: Shrinkwrap;
|
||||
private shrinkwrapPackages?: Map<string, ShrinkwrapPackage>;
|
||||
private packageRepository: string;
|
||||
private readonly packageStore: string;
|
||||
|
||||
constructor(public readonly rushConfig: RushConfiguration) {
|
||||
this.packageRepository = path.join(rushConfig.pnpmStoreFolder, '2/registry.npmjs.org');
|
||||
this.packageStore = path.join(rushConfig.pnpmStoreFolder, '2');
|
||||
}
|
||||
|
||||
private async findPackageInRepository(name: string, version: string): Promise<string> {
|
||||
// Packages may be pulled from multiple registries, each of which has its own directory in the
|
||||
// pnpm store. Search for the package name in any of these directories. We use `*.*` to match
|
||||
// the directory name to avoid searching the `local` directory, which does not represent a
|
||||
// package registry.
|
||||
const results = await glob(`*.*/${name}/${version}/package`, {
|
||||
absolute: true,
|
||||
cwd: this.packageStore
|
||||
});
|
||||
if (results.length === 0) {
|
||||
throw new Error(`Package '${name}:${version}' not found in package repository.`);
|
||||
}
|
||||
else if (results.length > 1) {
|
||||
throw new Error(`Multiple copies of package '${name}:${version}' found in package repository.`);
|
||||
}
|
||||
else {
|
||||
return results[0];
|
||||
}
|
||||
}
|
||||
|
||||
private getRushProjectPath(name: string): string | undefined {
|
||||
@@ -86,10 +107,7 @@ export class RushContext {
|
||||
pkg = await this.getShrinkwrapPackage(name, version);
|
||||
// Ensure a proper version number. pnpm uses syntax like 3.4.0_glob@7.1.6 for peer dependencies
|
||||
version = version.split('_')[0];
|
||||
packagePath = path.join(this.packageRepository, name, version, 'package');
|
||||
if (!await fs.pathExists(packagePath)) {
|
||||
throw new Error(`Package '${name}:${version}' not found in package repository.`);
|
||||
}
|
||||
packagePath = await this.findPackageInRepository(name, version);
|
||||
packagePath = await fs.realpath(packagePath);
|
||||
config = jsonc.parse(await fs.readFile(path.join(packagePath, 'package.json'), 'utf8'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user