-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 26add93
Showing
39 changed files
with
7,665 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# https://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[.gitattributes] | ||
indent_size = 16 | ||
|
||
[*.{diff,patch}] | ||
end_of_line = lf | ||
trim_trailing_whitespace = false | ||
|
||
[*.json] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
indent_size = 2 | ||
trim_trailing_whitespace = false | ||
|
||
[*.{mjs,ts}] | ||
indent_size = 2 | ||
|
||
[*.{yaml,yml}] | ||
indent_size = 2 |
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,32 @@ | ||
# CAUTION: | ||
# Always run the following command after adding/editing an | ||
# `eol` entry: | ||
# | ||
# git add --renormalize FILES_WITH_AFFECTED_EXTENSION | ||
# | ||
# This keeps existing files consistent with the new setting. | ||
# | ||
# Example: | ||
# | ||
# git add --renormalize '*.foo' '*.bar' | ||
|
||
.editorconfig text eol=lf | ||
.gitattributes text eol=lf | ||
.gitignore text eol=lf | ||
|
||
# LF required for interactive patching as of Git 2.17.1 | ||
*.diff text eol=lf | ||
*.patch text eol=lf | ||
|
||
*.json text eol=lf | ||
*.md text eol=lf | ||
*.mjs text eol=lf | ||
*.ts text eol=lf | ||
*.txt text eol=lf | ||
*.yaml text eol=lf | ||
*.yml text eol=lf | ||
|
||
# No need to diff or patch these | ||
/.yarn/plugins/** binary | ||
/.yarn/releases/*.cjs binary | ||
/.yarn/sdks/** binary |
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,27 @@ | ||
name: Run unit tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use specified Node.js version | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Compile | ||
run: yarn compile | ||
|
||
- name: Run linter | ||
run: yarn lint | ||
|
||
- name: Run unit tests | ||
run: yarn test |
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,7 @@ | ||
/.pnp.* | ||
/.yarn/* | ||
!/.yarn/patches/ | ||
!/.yarn/plugins/ | ||
!/.yarn/releases/ | ||
!/.yarn/sdks/ | ||
!/.yarn/versions/ |
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 @@ | ||
lts/gallium |
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,11 @@ | ||
{ | ||
"recommendations": [ | ||
"arcanis.vscode-zipfs", | ||
"davidanson.vscode-markdownlint", | ||
"dbaeumer.vscode-eslint", | ||
"editorconfig.editorconfig", | ||
"henrynguyen5-vsc.vsc-nvm", | ||
"orta.vscode-jest", | ||
"redhat.vscode-yaml" | ||
] | ||
} |
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,17 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Launch Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}/extension/build" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/extension/build/**/*.js", | ||
"${workspaceFolder}/extension/build/**/*.js.map" | ||
], | ||
"preLaunchTask": "Compile" | ||
} | ||
] | ||
} |
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,51 @@ | ||
{ | ||
"[javascript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | ||
"editor.formatOnSave": true, | ||
"editor.rulers": [ | ||
80 | ||
] | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "vscode.json-language-features" | ||
}, | ||
"[jsonc]": { | ||
"editor.defaultFormatter": "vscode.json-language-features" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "dbaeumer.vscode-eslint", | ||
"editor.formatOnSave": true, | ||
"editor.rulers": [ | ||
80 | ||
] | ||
}, | ||
"[yaml]": { | ||
"editor.defaultFormatter": "redhat.vscode-yaml" | ||
}, | ||
"eslint.format.enable": true, | ||
"eslint.nodePath": ".yarn/sdks", | ||
"files.exclude": { | ||
"**/.git": true | ||
}, | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": [ | ||
"*.tmLanguage.json" | ||
], | ||
"url": "https://raw.githubusercontent.com/Septh/tmlanguage/master/tmlanguage.json" | ||
} | ||
], | ||
"markdownlint.config": { | ||
"MD033": false | ||
}, | ||
"search.exclude": { | ||
"/extension/build": true, | ||
"/extension/dist": true, | ||
"/extension/types": true, | ||
"/extension/work": true, | ||
"**/.yarn": true, | ||
"**/.pnp.*": true | ||
}, | ||
"typescript.enablePromptUseWorkspaceTsdk": true, | ||
"typescript.tsdk": ".yarn/sdks/typescript/lib" | ||
} |
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,21 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Compile", | ||
"type": "shell", | ||
"command": "if ! type nvm > /dev/null && [ \"${NVM_DIR}\" ] && [ -s \"${NVM_DIR}/nvm.sh\" ]; then . \"${NVM_DIR}/nvm.sh\"; nvm use; fi; node --version && yarn compile", | ||
"args": [], | ||
"problemMatcher": [ | ||
"$tsc" | ||
], | ||
"presentation": { | ||
"reveal": "silent" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
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,64 @@ | ||
diff --git a/out/main.js b/out/main.js | ||
index 8c330a58e9026b908515dc7f8e2a50242b089de1..cd3f2d7e4c5e34a2604fec7a3bd73548eed5fbef 100644 | ||
--- a/out/main.js | ||
+++ b/out/main.js | ||
@@ -77,6 +77,7 @@ module.exports = function (argv) { | ||
commander_1.default | ||
.command('ls') | ||
.description('Lists all the files that will be published') | ||
+ .option('-C, --cwd <directory>', 'Start in <directory> as the current working directory.') | ||
.option('--yarn', 'Use yarn instead of npm (default inferred from presence of yarn.lock or .yarnrc)') | ||
.option('--no-yarn', 'Use npm instead of yarn (default inferred from lack of yarn.lock or .yarnrc)') | ||
.option('--packagedDependencies <path>', 'Select packages that should be published only (includes dependencies)', (val, all) => (all ? all.concat(val) : [val]), undefined) | ||
@@ -84,13 +85,14 @@ module.exports = function (argv) { | ||
// default must remain undefined for dependencies or we will fail to load defaults from package.json | ||
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined) | ||
.option('--no-dependencies', 'Disable dependency detection via npm or yarn', undefined) | ||
- .action(({ yarn, packagedDependencies, ignoreFile, dependencies }) => main((0, package_1.ls)({ useYarn: yarn, packagedDependencies, ignoreFile, dependencies }))); | ||
+ .action(({ cwd, yarn, packagedDependencies, ignoreFile, dependencies }) => main((0, package_1.ls)({ cwd, useYarn: yarn, packagedDependencies, ignoreFile, dependencies }))); | ||
commander_1.default | ||
.command('package [version]') | ||
.description('Packages an extension') | ||
.option('-o, --out <path>', 'Output .vsix extension file to <path> location (defaults to <name>-<version>.vsix)') | ||
.option('-t, --target <target>', `Target architecture. Valid targets: ${ValidTargets}`) | ||
.option('-m, --message <commit message>', 'Commit message used when calling `npm version`.') | ||
+ .option('-C, --cwd <directory>', 'Start in <directory> as the current working directory.') | ||
.option('--no-git-tag-version', 'Do not create a version commit and tag when calling `npm version`. Valid only when [version] is provided.') | ||
.option('--no-update-package-json', 'Do not update `package.json`. Valid only when [version] is provided.') | ||
.option('--githubBranch <branch>', 'The GitHub branch used to infer relative links in README.md. Can be overridden by --baseContentUrl and --baseImagesUrl.') | ||
@@ -109,11 +111,12 @@ module.exports = function (argv) { | ||
.option('--pre-release', 'Mark this package as a pre-release') | ||
.option('--allow-star-activation', 'Allow using * in activation events') | ||
.option('--allow-missing-repository', 'Allow missing a repository URL in package.json') | ||
- .action((version, { out, target, message, gitTagVersion, updatePackageJson, githubBranch, gitlabBranch, rewriteRelativeLinks, baseContentUrl, baseImagesUrl, yarn, ignoreFile, gitHubIssueLinking, gitLabIssueLinking, dependencies, preRelease, allowStarActivation, allowMissingRepository, }) => main((0, package_1.packageCommand)({ | ||
+ .action((version, { out, target, message, cwd, gitTagVersion, updatePackageJson, githubBranch, gitlabBranch, rewriteRelativeLinks, baseContentUrl, baseImagesUrl, yarn, ignoreFile, gitHubIssueLinking, gitLabIssueLinking, dependencies, preRelease, allowStarActivation, allowMissingRepository, }) => main((0, package_1.packageCommand)({ | ||
packagePath: out, | ||
version, | ||
target, | ||
commitMessage: message, | ||
+ cwd, | ||
gitTagVersion, | ||
updatePackageJson, | ||
githubBranch, | ||
@@ -136,6 +139,7 @@ module.exports = function (argv) { | ||
.option('-p, --pat <token>', 'Personal Access Token (defaults to VSCE_PAT environment variable)', process.env['VSCE_PAT']) | ||
.option('-t, --target <targets...>', `Target architectures. Valid targets: ${ValidTargets}`) | ||
.option('-m, --message <commit message>', 'Commit message used when calling `npm version`.') | ||
+ .option('-C, --cwd <directory>', 'Start in <directory> as the current working directory.') | ||
.option('--no-git-tag-version', 'Do not create a version commit and tag when calling `npm version`. Valid only when [version] is provided.') | ||
.option('--no-update-package-json', 'Do not update `package.json`. Valid only when [version] is provided.') | ||
.option('-i, --packagePath <paths...>', 'Publish the provided VSIX packages.') | ||
@@ -154,11 +158,12 @@ module.exports = function (argv) { | ||
.option('--allow-star-activation', 'Allow using * in activation events') | ||
.option('--allow-missing-repository', 'Allow missing a repository URL in package.json') | ||
.option('--skip-duplicate', 'Fail silently if version already exists on the marketplace') | ||
- .action((version, { pat, target, message, gitTagVersion, updatePackageJson, packagePath, githubBranch, gitlabBranch, baseContentUrl, baseImagesUrl, yarn, noVerify, ignoreFile, dependencies, preRelease, allowStarActivation, allowMissingRepository, skipDuplicate, }) => main((0, publish_1.publish)({ | ||
+ .action((version, { pat, target, message, cwd, gitTagVersion, updatePackageJson, packagePath, githubBranch, gitlabBranch, baseContentUrl, baseImagesUrl, yarn, noVerify, ignoreFile, dependencies, preRelease, allowStarActivation, allowMissingRepository, skipDuplicate, }) => main((0, publish_1.publish)({ | ||
pat, | ||
version, | ||
targets: target, | ||
commitMessage: message, | ||
+ cwd, | ||
gitTagVersion, | ||
updatePackageJson, | ||
packagePath, |
Oops, something went wrong.