Selaa lähdekoodia

Updates dependencies & runs prettier formatting

main
Eric Amodio 5 vuotta sitten
vanhempi
commit
39af55655b
13 muutettua tiedostoa jossa 106 lisäystä ja 80 poistoa
  1. +66
    -26
      package-lock.json
  2. +7
    -7
      package.json
  3. +1
    -3
      src/annotations/annotations.ts
  4. +1
    -3
      src/git/formatters/statusFormatter.ts
  5. +1
    -3
      src/git/models/status.ts
  6. +2
    -6
      src/git/parsers/logParser.ts
  7. +1
    -3
      src/git/shell.ts
  8. +1
    -3
      src/quickpicks/repoStatusQuickPick.ts
  9. +1
    -3
      src/views/nodes/commitNode.ts
  10. +1
    -3
      src/views/nodes/compareBranchNode.ts
  11. +1
    -3
      src/views/nodes/contributorNode.ts
  12. +1
    -3
      src/views/nodes/remoteNode.ts
  13. +22
    -14
      webpack.config.js

+ 66
- 26
package-lock.json Näytä tiedosto

@ -1817,12 +1817,28 @@
}
},
"clean-webpack-plugin": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-2.0.2.tgz",
"integrity": "sha512-pi1111o4OBd9qvacbgs+NRqClfVPKVIc66B4d8kx6Ho/L+i9entQ/NpK600CsTYTPu3kWvKwwyKarsYMvC2xeA==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz",
"integrity": "sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A==",
"dev": true,
"requires": {
"del": "^4.0.0"
"@types/webpack": "^4.4.31",
"del": "^4.1.1"
},
"dependencies": {
"@types/webpack": {
"version": "4.4.32",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.4.32.tgz",
"integrity": "sha512-mNARoaSJTzbiHxtZbf9NULFilu2frqD+g9Iyl9V2jPYJWXi+AC3Hz8lQWPZ5LLtgUm7iF4SDDMB/1bPrbRQgFw==",
"dev": true,
"requires": {
"@types/anymatch": "*",
"@types/node": "*",
"@types/tapable": "*",
"@types/uglify-js": "*",
"source-map": "^0.6.0"
}
}
}
},
"cli-cursor": {
@ -3931,9 +3947,9 @@
"dev": true
},
"fork-ts-checker-webpack-plugin": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.3.4.tgz",
"integrity": "sha512-2QDXnI2mbbly/OHx/ivtspi2l4K2g+IB0LTQ3AwsBfxyHtMFXtojlsJqGyhUggX08BC+F02CoCG0hRSPOLU2dQ==",
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.3.5.tgz",
"integrity": "sha512-LpjSKaEVM17pst4MZeZWoYxwozZm4AB+bz4fR5oY9ksSwea86Dhj7J2dDEiHLlb+HtEwarh741kgMi25i+V6iw==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@ -6577,15 +6593,39 @@
"dev": true
},
"mini-css-extract-plugin": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.6.0.tgz",
"integrity": "sha512-79q5P7YGI6rdnVyIAV4NXpBQJFWdkzJxCim3Kog4078fM0piAaFlwocqbejdWtLW1cEzCexPrh6EdyFsPgVdAw==",
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.7.0.tgz",
"integrity": "sha512-RQIw6+7utTYn8DBGsf/LpRgZCJMpZt+kuawJ/fju0KiOL6nAaTBNmCJwS7HtwSCXfS47gCkmtBFS7HdsquhdxQ==",
"dev": true,
"requires": {
"loader-utils": "^1.1.0",
"normalize-url": "^2.0.1",
"normalize-url": "1.9.1",
"schema-utils": "^1.0.0",
"webpack-sources": "^1.1.0"
},
"dependencies": {
"normalize-url": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
"integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=",
"dev": true,
"requires": {
"object-assign": "^4.0.1",
"prepend-http": "^1.0.0",
"query-string": "^4.1.0",
"sort-keys": "^1.0.0"
}
},
"query-string": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz",
"integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=",
"dev": true,
"requires": {
"object-assign": "^4.1.0",
"strict-uri-encode": "^1.0.0"
}
}
}
},
"minimalistic-assert": {
@ -7879,9 +7919,9 @@
"dev": true
},
"prettier": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.1.tgz",
"integrity": "sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==",
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.0.tgz",
"integrity": "sha512-YsdAD29M0+WY2xXZk3i0PA16olY9qZss+AuODxglXcJ+2ZBwFv+6k5tE8GS8/HKAthaajlS/WqhdgcjumOrPlg==",
"dev": true
},
"prettier-eslint": {
@ -10109,9 +10149,9 @@
"dev": true
},
"ts-loader": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.0.1.tgz",
"integrity": "sha512-9H5ErTIw5t73sdSoFE0hX0RO45B7cdDA4pW1VIQ2wNFAhxSpZcAlv2fwMcfv6SAYLoI7uGwHuzC5dECzmzqtzA==",
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-6.0.2.tgz",
"integrity": "sha512-kkF3sGf3oBUehlvXI9fkbItbFTnNgGkYAz91vtWnsKAU4m+LAmQjuby7uTZNo3As+/zHLuyB052SkQDY6vLXtg==",
"dev": true,
"requires": {
"chalk": "^2.3.0",
@ -10156,9 +10196,9 @@
}
},
"semver": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz",
"integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz",
"integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==",
"dev": true
},
"to-regex-range": {
@ -10250,9 +10290,9 @@
"dev": true
},
"typescript": {
"version": "3.5.0-rc",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.0-rc.tgz",
"integrity": "sha512-8Os3bqTeHc6bf+bkPFL3O/pb09j8SbDa2LUBxTXWpZlcHUW9ziGuiEFiqMcArkbAjGLqEzshkl4zvxhb0gVPuQ==",
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==",
"dev": true
},
"typescript-eslint-parser": {
@ -10732,9 +10772,9 @@
}
},
"webpack": {
"version": "4.32.2",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.32.2.tgz",
"integrity": "sha512-F+H2Aa1TprTQrpodRAWUMJn7A8MgDx82yQiNvYMaj3d1nv3HetKU0oqEulL9huj8enirKi8KvEXQ3QtuHF89Zg==",
"version": "4.33.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.33.0.tgz",
"integrity": "sha512-ggWMb0B2QUuYso6FPZKUohOgfm+Z0sVFs8WwWuSH1IAvkWs428VDNmOlAxvHGTB9Dm/qOB/qtE5cRx5y01clxw==",
"dev": true,
"requires": {
"@webassemblyjs/ast": "1.8.5",

+ 7
- 7
package.json Näytä tiedosto

@ -5192,7 +5192,7 @@
"@types/node": "10.1.4",
"@typescript-eslint/eslint-plugin": "1.9.0",
"@typescript-eslint/parser": "1.9.0",
"clean-webpack-plugin": "2.0.2",
"clean-webpack-plugin": "3.0.0",
"circular-dependency-plugin": "5.0.2",
"css-loader": "2.1.1",
"eslint": "5.16.0",
@ -5201,22 +5201,22 @@
"eslint-loader": "2.1.2",
"eslint-plugin-import": "2.17.3",
"eslint-plugin-prettiest": "0.0.1",
"fork-ts-checker-webpack-plugin": "1.3.4",
"fork-ts-checker-webpack-plugin": "1.3.5",
"html-webpack-exclude-assets-plugin": "0.0.7",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "3.2.0",
"imagemin-webpack-plugin": "2.4.2",
"mini-css-extract-plugin": "0.6.0",
"mini-css-extract-plugin": "0.7.0",
"node-sass": "4.12.0",
"prettier": "1.17.1",
"prettier": "1.18.0",
"prettier-eslint": "8.8.2",
"sass-loader": "7.1.0",
"terser-webpack-plugin": "1.3.0",
"ts-loader": "6.0.1",
"typescript": "3.5.0-rc",
"ts-loader": "6.0.2",
"typescript": "3.5.1",
"vsce": "1.62.0",
"vscode": "1.1.34",
"webpack": "4.32.2",
"webpack": "4.33.0",
"webpack-cli": "3.3.2",
"webpack-bundle-analyzer": "3.3.2"
}

+ 1
- 3
src/annotations/annotations.ts Näytä tiedosto

@ -174,9 +174,7 @@ export class Annotations {
)} "Show Commit Details")`;
}
message += `   ${GlyphChars.Dash}   ${previous}  ${
GlyphChars.ArrowLeftRightLong
}  ${current}\n${diff}`;
message += `   ${GlyphChars.Dash}   ${previous}  ${GlyphChars.ArrowLeftRightLong}  ${current}\n${diff}`;
const markdown = new MarkdownString(message);
markdown.isTrusted = true;

+ 1
- 3
src/git/formatters/statusFormatter.ts Näytä tiedosto

@ -67,9 +67,7 @@ export class StatusFileFormatter extends Formatter
icon = `${GlyphChars.Pencil}${GlyphChars.Space}${GlyphChars.SpaceThinnest}${GlyphChars.Check}`;
}
else if (statusFile.workingTreeStatus !== undefined) {
icon = `${GlyphChars.Pencil}${GlyphChars.SpaceThin}${GlyphChars.SpaceThinnest}${GlyphChars.EnDash}${
GlyphChars.Space
}`;
icon = `${GlyphChars.Pencil}${GlyphChars.SpaceThin}${GlyphChars.SpaceThinnest}${GlyphChars.EnDash}${GlyphChars.Space}`;
}
else if (statusFile.indexStatus !== undefined) {
icon = `${GlyphChars.Space}${GlyphChars.EnDash}${GlyphChars.Space.repeat(2)}${GlyphChars.Check}`;

+ 1
- 3
src/git/models/status.ts Näytä tiedosto

@ -135,9 +135,7 @@ export class GitStatus {
return `${prefix}${status}${suffix}`;
}
return `${prefix}${state.behind}${GlyphChars.ArrowDown}${separator}${state.ahead}${
GlyphChars.ArrowUp
}${suffix}`;
return `${prefix}${state.behind}${GlyphChars.ArrowDown}${separator}${state.ahead}${GlyphChars.ArrowUp}${suffix}`;
}
}

+ 2
- 6
src/git/parsers/logParser.ts Näytä tiedosto

@ -272,12 +272,8 @@ export class GitLogParser {
renamedFileName
);
if (renamedMatch != null) {
entry.fileName = `${renamedMatch[1]}${renamedMatch[3]}${
renamedMatch[4]
}`;
entry.originalFileName = `${renamedMatch[1]}${renamedMatch[2]}${
renamedMatch[4]
}`;
entry.fileName = `${renamedMatch[1]}${renamedMatch[3]}${renamedMatch[4]}`;
entry.originalFileName = `${renamedMatch[1]}${renamedMatch[2]}${renamedMatch[4]}`;
}
else {
renamedMatch = fileStatusAndSummaryRenamedFileRegex.exec(

+ 1
- 3
src/git/shell.ts Näytä tiedosto

@ -154,9 +154,7 @@ export function run(
(error: (Error & { stdout?: TOut | undefined }) | null, stdout, stderr) => {
if (error != null) {
if (bufferExceededRegex.test(error.message)) {
error.message = `Command output exceeded the allocated stdout buffer. Set 'options.maxBuffer' to a larger value than ${
opts.maxBuffer
} bytes`;
error.message = `Command output exceeded the allocated stdout buffer. Set 'options.maxBuffer' to a larger value than ${opts.maxBuffer} bytes`;
}
error.stdout =

+ 1
- 3
src/quickpicks/repoStatusQuickPick.ts Näytä tiedosto

@ -414,9 +414,7 @@ export class RepoStatusQuickPick {
0,
new CommandQuickPickItem(
{
label: `$(git-branch) ${status.branch} is up-to-date with ${GlyphChars.Space}$(git-branch) ${
status.upstream
}`,
label: `$(git-branch) ${status.branch} is up-to-date with ${GlyphChars.Space}$(git-branch) ${status.upstream}`,
description: ''
},
Commands.ShowQuickRepoStatus,

+ 1
- 3
src/views/nodes/commitNode.ts Näytä tiedosto

@ -63,9 +63,7 @@ export class CommitNode extends ViewRefNode {
const branchAndTagTips = this.getBranchAndTagTips && this.getBranchAndTagTips(this.commit.sha);
if (branchAndTagTips !== undefined) {
label = `${GlyphChars.AngleBracketLeftHeavy}${GlyphChars.SpaceThin}${branchAndTagTips}${
GlyphChars.SpaceThin
}${GlyphChars.AngleBracketRightHeavy}${GlyphChars.ArrowHeadRight}${GlyphChars.Space} ${label}`;
label = `${GlyphChars.AngleBracketLeftHeavy}${GlyphChars.SpaceThin}${branchAndTagTips}${GlyphChars.SpaceThin}${GlyphChars.AngleBracketRightHeavy}${GlyphChars.ArrowHeadRight}${GlyphChars.Space} ${label}`;
}
const item = new TreeItem(label, TreeItemCollapsibleState.Collapsed);

+ 1
- 3
src/views/nodes/compareBranchNode.ts Näytä tiedosto

@ -22,9 +22,7 @@ export class CompareBranchNode extends ViewNode {
}
get id(): string {
return `${this._instanceId}:gitlens:repository(${this.branch.repoPath}):branch(${
this.branch.name
}):compareWith`;
return `${this._instanceId}:gitlens:repository(${this.branch.repoPath}):branch(${this.branch.name}):compareWith`;
}
getChildren(): ViewNode[] {

+ 1
- 3
src/views/nodes/contributorNode.ts Näytä tiedosto

@ -19,9 +19,7 @@ export class ContributorNode extends ViewNode implements Pagea
}
get id(): string {
return `${this._instanceId}:gitlens:repository(${this.contributor.repoPath}):contributor(${
this.contributor.name
}|${this.contributor.email}}`;
return `${this._instanceId}:gitlens:repository(${this.contributor.repoPath}):contributor(${this.contributor.name}|${this.contributor.email}}`;
}
async getChildren(): Promise<ViewNode[]> {

+ 1
- 3
src/views/nodes/remoteNode.ts Näytä tiedosto

@ -22,9 +22,7 @@ export class RemoteNode extends ViewNode {
}
get id(): string {
return `${this._instanceId}:gitlens:repository(${this.remote.repoPath}):remote(${this.remote.name}:${
this.remote.id
})`;
return `${this._instanceId}:gitlens:repository(${this.remote.repoPath}):remote(${this.remote.name}:${this.remote.id})`;
}
async getChildren(): Promise<ViewNode[]> {

+ 22
- 14
webpack.config.js Näytä tiedosto

@ -1,10 +1,11 @@
'use strict';
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const webpack = require('webpack');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const CleanPlugin = require('clean-webpack-plugin');
const { CleanWebpackPlugin: CleanPlugin } = require('clean-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const ForkTsCheckerPlugin = require('fork-ts-checker-webpack-plugin');
const HtmlExcludeAssetsPlugin = require('html-webpack-exclude-assets-plugin');
@ -29,6 +30,9 @@ module.exports = function(env, argv) {
};
function getExtensionConfig(env) {
/**
* @type any[]
*/
const plugins = [
new CleanPlugin(),
new ForkTsCheckerPlugin({
@ -78,6 +82,7 @@ function getExtensionConfig(env) {
terserOptions: {
ecma: 8,
// Keep the class names otherwise @log won't provide a useful name
// eslint-disable-next-line @typescript-eslint/camelcase
keep_classnames: true,
module: true
}
@ -90,18 +95,19 @@ function getExtensionConfig(env) {
module: {
rules: [
{
test: /\.tsx?$/,
enforce: 'pre',
exclude: /node_modules|\.d\.ts$/,
test: /\.tsx?$/,
use: {
loader: 'eslint-loader',
options: {
cache: true,
failOnError: true
}
},
exclude: /node_modules/
}
},
{
exclude: /node_modules|\.d\.ts$/,
test: /\.tsx?$/,
use: {
loader: 'ts-loader',
@ -109,8 +115,7 @@ function getExtensionConfig(env) {
transpileOnly: true,
experimentalWatchApi: true
}
},
exclude: /node_modules/
}
}
]
},
@ -137,6 +142,9 @@ function getWebviewsConfig(env) {
clean.push('images/settings');
}
/**
* @type any[]
*/
const plugins = [
new CleanPlugin({ cleanOnceBeforeBuildPatterns: clean }),
new ForkTsCheckerPlugin({
@ -148,7 +156,7 @@ function getWebviewsConfig(env) {
filename: '[name].css'
}),
new HtmlPlugin({
excludeAssets: [/main\.js/],
excludeAssets: [/.+-styles\.js/],
excludeChunks: ['welcome'],
template: 'settings/index.html',
filename: path.resolve(__dirname, 'dist/webviews/settings.html'),
@ -168,7 +176,7 @@ function getWebviewsConfig(env) {
: false
}),
new HtmlPlugin({
excludeAssets: [/main\.js/],
excludeAssets: [/.+-styles\.js/],
excludeChunks: ['settings'],
template: 'welcome/index.html',
filename: path.resolve(__dirname, 'dist/webviews/welcome.html'),
@ -212,7 +220,7 @@ function getWebviewsConfig(env) {
name: 'webviews',
context: path.resolve(__dirname, 'src/webviews/apps'),
entry: {
main: ['./scss/main.scss'],
'main-styles': ['./scss/main.scss'],
settings: ['./settings/index.ts'],
welcome: ['./welcome/index.ts']
},
@ -226,18 +234,19 @@ function getWebviewsConfig(env) {
module: {
rules: [
{
test: /\.tsx?$/,
enforce: 'pre',
exclude: /node_modules|\.d\.ts$/,
test: /\.tsx?$/,
use: {
loader: 'eslint-loader',
options: {
cache: true,
failOnError: true
}
},
exclude: /node_modules/
}
},
{
exclude: /node_modules|\.d\.ts$/,
test: /\.tsx?$/,
use: {
loader: 'ts-loader',
@ -246,8 +255,7 @@ function getWebviewsConfig(env) {
transpileOnly: true,
experimentalWatchApi: true
}
},
exclude: /node_modules/
}
},
{
test: /\.scss$/,

Ladataan…
Peruuta
Tallenna