Skip to content

Commit 251e294

Browse files
committed
Migrates VS Code extension
1 parent 77a14fe commit 251e294

File tree

119 files changed

+25022
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+25022
-4
lines changed

.eslintrc.json

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": "warn",
13+
"@typescript-eslint/semi": "warn",
14+
"no-unused-vars": "error",
15+
"no-undef": "off",
16+
"no-const-assign": "error",
17+
"prefer-const": "error",
18+
"semi": "error",
19+
"no-extra-semi": "error",
20+
"semi-spacing": [
21+
"error",
22+
{
23+
"before": false,
24+
"after": true
25+
}
26+
],
27+
"no-dupe-else-if": "error",
28+
"no-debugger": "error",
29+
"no-console": "error",
30+
"no-compare-neg-zero": "error",
31+
"no-duplicate-case": "error",
32+
"no-empty": "error",
33+
"no-import-assign": "error",
34+
"no-obj-calls": "error",
35+
"no-prototype-builtins": "error",
36+
"no-template-curly-in-string": "error",
37+
"valid-typeof": "error",
38+
"block-scoped-var": "error",
39+
"default-case": "error",
40+
"eqeqeq": "error",
41+
"no-alert": "error",
42+
"no-eq-null": "error",
43+
"no-sequences": "error",
44+
"no-throw-literal": "error",
45+
"no-trailing-spaces": "error",
46+
"no-whitespace-before-property": "error",
47+
"block-spacing": "error",
48+
"quotes": [
49+
"error",
50+
"single"
51+
]
52+
},
53+
"ignorePatterns": [
54+
"out",
55+
"dist",
56+
"**/*.d.ts"
57+
]
58+
}

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Set default behavior to automatically normalize line endings.
2+
* text=auto
3+

.github/ISSUE_TEMPLATE/bug-report.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: 🐞 Bug report
2+
description: If something is not working as expected please open up a bug to help us fix the issue ASAP and improve the product.
3+
title: "🐞 Bug report: "
4+
labels: ["🐞 bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for reporting the issue you are facing.
10+
11+
Please complete the below form to ensure we have the necessary details to assist you.
12+
- type: dropdown
13+
id: bug-priority
14+
attributes:
15+
label: ⭐ Priority
16+
description: Let us know how this issue is affecting you
17+
options:
18+
- (Low)☹️ Something is a little off
19+
- (Medium)😢 I'm annoyed but I'll live
20+
- (Urgent)⚠️😱 I can't use the extension
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: bug-description
25+
attributes:
26+
label: 📝 Describe the bug
27+
description: Provide a clear description of the bug
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: bug-repro-steps
32+
attributes:
33+
label: 👣 Steps To Reproduce
34+
description: Add steps to reproduce the behavior
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: bug-expected-behavior
39+
attributes:
40+
label: 📜 Expected behavior
41+
description: Provide a clear description of what you expected to happen
42+
validations:
43+
required: true
44+
- type: textarea
45+
id: bug-image
46+
attributes:
47+
label: 📷 Screenshots
48+
description: If applicable, add screenshots to help explain your problem
49+
validations:
50+
required: false
51+
- type: input
52+
id: bug-version
53+
attributes:
54+
label: ❓VS Code Extension version
55+
description: Provide the version of the PnP PowerShell VS Code Extension you are using
56+
validations:
57+
required: false
58+
- type: textarea
59+
id: bug-more-info
60+
attributes:
61+
label: 🤔 Additional context
62+
description: Add any other context or information about the problem here
63+
validations:
64+
required: false
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 💡 Feature request
2+
description: Suggest an idea for this project.
3+
title: "💡 [Feature]: "
4+
labels: ["⭐ enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for suggesting a new feature. You Rock! 🤩
10+
11+
Please complete the below form to ensure we have the necessary details to get started.
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: 🎯 Aim of the feature
16+
description: Provide a clear description explaining the idea.
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: image
21+
attributes:
22+
label: 📷 Images (if possible) with expected result
23+
description: If applicable, add screenshots or drawings to help explain your idea.
24+
validations:
25+
required: false
26+
- type: textarea
27+
id: more-info
28+
attributes:
29+
label: 🤔 Additional remarks or comments
30+
description: Add any other context or information about the idea here.
31+
validations:
32+
required: false

.github/pull_request_template.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## 🎯 Aim
2+
3+
> describe the purpose of this pull request [Remove this line]
4+
5+
## 📷 Result
6+
7+
> include images or a movie with a result of your change [Remove this line]
8+
9+
## ✅ What was done
10+
11+
> clarify what was done and what still needs to be finished ex. [Remove this line]
12+
13+
- [] not done
14+
- [X] done
15+
16+
## 🔗 Related issue
17+
18+
> each PR should be linked with a related issue [Remove this line]
19+
20+
Closes: #9999999

.github/workflows/codeql-analysis.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main", approvePattern ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ "main" ]
20+
schedule:
21+
- cron: '21 5 * * 3'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript' ]
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
40+
41+
# Initializes the CodeQL tools for scanning.
42+
- name: Initialize CodeQL
43+
uses: github/codeql-action/init@v2
44+
with:
45+
languages: ${{ matrix.language }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
50+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
51+
# queries: security-extended,security-and-quality
52+
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v2
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
61+
62+
# If the Autobuild fails above, remove it and uncomment the following three lines.
63+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
64+
65+
# - run: |
66+
# echo "Run, Build Application using script"
67+
# ./location_of_script_within_repo/buildscript.sh
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v2

.github/workflows/prepare-release.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "Prepare Release"
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 12 * * 6'
7+
- cron: '0 12 * * 3'
8+
9+
jobs:
10+
deploy:
11+
name: "Prepare Release"
12+
runs-on: windows-latest
13+
14+
steps:
15+
- name: Use Node.js 20
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Checkout PnP PowerShell VS Code Extension
22+
uses: actions/checkout@v4
23+
with:
24+
path: vscode-pnp-powershell
25+
26+
- name: Checkout PnP PowerShell
27+
uses: actions/checkout@v4
28+
with:
29+
repository: pnp/powershell
30+
path: powershell
31+
32+
- name: Checkout PnP Script Samples
33+
uses: actions/checkout@v4
34+
with:
35+
repository: pnp/script-samples
36+
path: script-samples
37+
38+
- name: Run create script samples script
39+
run: .\vscode-pnp-powershell\scripts\createScriptSampleDefenition.ps1 -PathToWorkspace ".\"
40+
shell: pwsh
41+
continue-on-error: false
42+
43+
- name: Run create snippet defenition script
44+
run: .\vscode-pnp-powershell\scripts\createSnippetDefenition.ps1 -PathToWorkspace ".\"
45+
shell: pwsh
46+
continue-on-error: false
47+
48+
- name: Run update package version script
49+
run: .\vscode-pnp-powershell\scripts\updatePackageVersion.ps1 -PathToWorkspace ".\"
50+
shell: pwsh
51+
continue-on-error: false
52+
53+
- name: Install dependencies
54+
run: npm run install:all
55+
working-directory: vscode-pnp-powershell
56+
57+
- name: Build
58+
run: npm run vscode:prepublish
59+
working-directory: vscode-pnp-powershell
60+
61+
- name: Create Pull Request
62+
uses: peter-evans/create-pull-request@v6
63+
with:
64+
path: vscode-pnp-powershell
65+
commit-message: Release
66+
branch: prepare-release
67+
title: Release
68+
body: |
69+
Hi, this is auto generated release. In order to release the extension, please follow the instructions below:
70+
71+
- review, approve and merge to `main` branch
72+
- create a new release with new tag that starts from `v*` prefix and number matches the extension version number from project.json. For example: `v1.0.0`
73+
- wait for the release to be published to the marketplace
74+
...

.github/workflows/release-local.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Create .vsix package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
name: Create .vsix package
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Use Node.js 20
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
registry-url: 'https://registry.npmjs.org'
17+
18+
- name: Checkout PnP PowerShell VS Code Extension
19+
uses: actions/checkout@v4
20+
21+
- name: Install dependencies
22+
run: npm run install:all
23+
24+
- name: Build
25+
run: npm run vscode:prepublish
26+
27+
- name: Package
28+
run: |
29+
npx @vscode/vsce package
30+
31+
- name: Upload artifacts
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: vsix_package
35+
path: |
36+
*.vsix

0 commit comments

Comments
 (0)