Skip to content

Commit 59c5981

Browse files
authored
Merge pull request #57 from paulober/develop
Major update v3
2 parents 9ee2de1 + 3ee1ca6 commit 59c5981

Some content is hidden

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

78 files changed

+15134
-11572
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
tab_width = 2
2+
indent_style = space
3+
indent_size = 2
4+
charset = utf-8
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true

.eslintrc.json

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22
"root": true,
33
"parser": "@typescript-eslint/parser",
44
"parserOptions": {
5-
"ecmaVersion": 11,
5+
"ecmaVersion": 12,
66
"sourceType": "module"
77
},
88
"plugins": [
99
"@typescript-eslint"
1010
],
1111
"rules": {
1212
"@typescript-eslint/naming-convention": "warn",
13+
"@typescript-eslint/no-unused-vars": "warn",
14+
"@typescript-eslint/no-explicit-any": "warn",
15+
"@typescript-eslint/array-type": ["error", { "default": "array-simple" }],
16+
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports" }],
17+
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
18+
"@typescript-eslint/consistent-type-exports": "error",
1319
"@typescript-eslint/semi": "warn",
1420
"curly": "warn",
1521
"eqeqeq": "warn",
@@ -18,7 +24,13 @@
1824
"no-mixed-requires":"error",
1925
"no-this-before-super": "warn",
2026
"no-unreachable": "warn",
21-
"no-unused-vars": "warn"
27+
"no-unused-vars": "off",
28+
"max-len": ["warn", { "code": 80, "comments": 100, "ignoreComments": false }],
29+
"no-fallthrough": "warn",
30+
"newline-before-return": "warn",
31+
"no-return-await": "warn",
32+
"arrow-body-style": ["error", "as-needed"],
33+
"no-unexpected-multiline": "error"
2234
},
2335
"ignorePatterns": [
2436
"out",
@@ -30,5 +42,11 @@
3042
"es6": true,
3143
"commonjs": true,
3244
"browser": false
33-
}
45+
},
46+
"extends": [
47+
"eslint:recommended",
48+
"plugin:@typescript-eslint/recommended",
49+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
50+
"prettier"
51+
]
3452
}

.github/CONTRIBUTING.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
# Contributing
22

3-
When contributing to this repository, please first discuss the change you wish to make via an issue, email, or any other method with the owners of this repository before making a change.
3+
When contributing to this repository, please first discuss the change you wish to make via an issue with the owners of this repository before making a change.
44

55
::Please note we have a Code of Conduct, please follow it in all your interactions with the project.::
66

77
## Pull Request Process
88

9-
1. Update the `README.md` with details of changes to the interface, this includes new environment variables, useful file locations and container parameters.
10-
2. Increase the version numbers in any examples files and the `README.md` to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](https://semver.org).
9+
### - NPM setup
10+
In order to install `paulober/pyboard-serial-com` sub-package you first have configure npm. See ["Configuring npm for use with GitHub Package Registry."](https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry#authenticating-to-github-package-registry)
11+
12+
### Repository setup
13+
1. Fork the repository into your private account
14+
2. Create a branch with following naming scheeme `fix-<issue-id>-<short-title-of-the-issue>`
15+
3. Download your fork of the repository (Github.cli recommended)
16+
4. `cd Pico-W-Go`
17+
5. Switch to your newly created branch (`git checkout <branch-name>` for example)
18+
6. `npm install`
19+
20+
Do changes and commits...
21+
22+
After the fix is complete DO some extensive testing if all what could be affected works without problems.
23+
24+
7. Now squash all your commits and name the final commit something like `Fix #<issue-id>, <Short title of the issue>`
25+
- The description of the squash commit should contain a list (description) of all the changes you've made
26+
27+
8. Push and create a pull request to the develop branch of paulober/Pico-W-Go
1128

1229
## Code of Conduct
1330

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,21 @@ jobs:
2727
permissions:
2828
actions: read
2929
contents: read
30+
packages: read
3031
security-events: write
3132

3233
strategy:
3334
fail-fast: false
3435
matrix:
35-
language: [ 'javascript']
36+
language: [ 'typescript', 'javascript']
3637
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3738
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3839

3940
steps:
4041
- name: Checkout repository
4142
uses: actions/checkout@v3
43+
44+
- run: sed -i '1i//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}' .npmrc
4245

4346
# Initializes the CodeQL tools for scanning.
4447
- name: Initialize CodeQL

.github/workflows/main.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,41 @@ on:
66
branches-ignore:
77
- "dependabot/**"
88
paths-ignore:
9-
- "doc/**"
9+
- ".idea/**"
10+
- ".vscode/**"
11+
- "**/*.md"
12+
- ".prettierrc.json"
13+
- "LICENSE"
14+
- ".editorconfig"
15+
- ".eslintrc.json"
16+
17+
permissions:
18+
contents: read
19+
packages: read
1020

1121
jobs:
1222
build:
13-
name: "Build ${{ matrix.os }}"
14-
runs-on: ${{ matrix.os }}
15-
strategy:
16-
matrix:
17-
os: [ubuntu-latest]
23+
name: "Build ubuntu-latest"
24+
runs-on: ubuntu-latest
25+
1826
steps:
1927
- uses: actions/checkout@v3
2028

2129
- name: Setup node
2230
uses: actions/setup-node@v3
2331
with:
2432
node-version: "16.14.x"
33+
registry-url: "https://npm.pkg.github.com"
34+
scope: "@paulober"
35+
token: ${{ secrets.GITHUB_TOKEN }}
2536

2637
- name: Install Dependencies
2738
shell: bash
2839
run: |
29-
npm install --no-audit
40+
sed -i '1i//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}' .npmrc
41+
npm ci --no-audit
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3044

3145
- name: Package Extension
32-
run: npx vsce package --no-yarn --dependencies -o picowgo-${{ github.sha }}.vsix
33-
34-
# Stop uploading artifacts for the basic build process
35-
# - name: Upload VSIX
36-
# #if: github.event_name == 'schedule'
37-
# uses: actions/upload-artifact@v3
38-
# with:
39-
# name: picowgo-nightly.vsix
40-
# path: ./picowgo-${{ github.sha }}.vsix
46+
run: npx @vscode/vsce package --no-yarn -o picowgo-${{ github.sha }}.vsix

.github/workflows/publish.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
deployments: write
10+
packages: read
11+
712
jobs:
813
release:
914
runs-on: ubuntu-22.04
@@ -13,14 +18,22 @@ jobs:
1318
- uses: actions/setup-node@v3
1419
with:
1520
node-version: '16.14.x'
21+
registry-url: "https://npm.pkg.github.com"
22+
scope: "@paulober"
23+
token: ${{ secrets.GITHUB_TOKEN }}
1624

17-
- run: npm install
18-
name: NPM install
25+
- name: NPM install
26+
shell: bash
27+
run: |
28+
sed -i '1i//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}' .npmrc
29+
npm ci --no-audit
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1932

2033
- name: Package
21-
run: npx vsce package --no-yarn --dependencies
34+
run: npx @vscode/vsce package --no-yarn
2235

23-
- run: npx vsce publish --no-yarn --dependencies --target win32-x64 linux-x64 linux-arm64 linux-armhf darwin-x64 darwin-arm64
36+
- run: npx @vscode/vsce publish --no-yarn --target win32-x64 win32-arm64 linux-x64 linux-arm64 linux-armhf darwin-x64 darwin-arm64
2437
name: Publish
2538
env:
2639
VSCE_PAT: ${{ secrets.VSCE_PAT }}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# no compiled
2-
out
3-
dist
2+
out/
3+
dist/
44
# no dependencies
55
node_modules
66
.vscode-test/

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@paulober:registry=https://npm.pkg.github.com

.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"printWidth": 80,
6+
"parser": "typescript",
7+
"singleQuote": false,
8+
"arrowParens": "avoid",
9+
"bracketSameLine": true
10+
}

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"--extensionDevelopmentPath=${workspaceFolder}"
1414
],
1515
"outFiles": [
16-
"${workspaceFolder}/dist/**/*.js"
16+
"${workspaceFolder}/dist/**/*.cjs"
1717
],
1818
"preLaunchTask": "${defaultBuildTask}"
1919
},

0 commit comments

Comments
 (0)