Skip to content

Commit

Permalink
Version 2.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennykorsukewitz committed Feb 21, 2024
1 parent 1d15121 commit f50b158
Show file tree
Hide file tree
Showing 16 changed files with 271 additions and 242 deletions.
45 changes: 25 additions & 20 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
{
"env": {
"browser": false,
"commonjs": true,
"es6": true,
"node": true,
"mocha": true
},
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
}
}
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "import",
"format": [ "camelCase", "PascalCase" ]
}
],
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ on:
jobs:
Lint:
uses: dennykorsukewitz/dennykorsukewitz/.github/workflows/reusable.lint.yml@dev
with:
VALIDATE_TYPESCRIPT_STANDARD: false
31 changes: 15 additions & 16 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@ jobs:
# os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- run: npm install
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- run: npm install

# - if: runner.os == 'MacOS'
# run: |
# npm i gulp gulp-cli -g
# gulp
# - if: runner.os == 'MacOS'
# run: |
# npm i gulp gulp-cli -g
# gulp

# - if: runner.os == 'Linux'
# run: xvfb-run -a npm test

# - if: runner.os != 'Linux'
- run: npm run test
# - if: runner.os == 'Linux'
# run: xvfb-run -a npm test

# - if: runner.os != 'Linux'
- run: npm run test
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
.env
coverage
node_modules
.vscode-test/**
.vscode-test*
out/
dist/
**/*.map
**/*test.js
**/*test.js.map
package-lock.json
.vscode/settings.json
*.vsix
Expand Down
34 changes: 28 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// A launch configuration that launches the extension inside a new window
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
Expand All @@ -11,16 +11,38 @@
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: compile"
},
{
"name": "Run Extension Tests",
"name": "Run Web Extension",
"type": "extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
]
"--extensionDevelopmentKind=web"
],
"outFiles": [
"${workspaceFolder}/out/web/**/*.js"
],
"preLaunchTask": "npm: compile-web"
},
{
"name": "Run Tests",
"type": "node-terminal",
"request": "launch",
"command": "npm run test",
},
{
"name": "Debug Current Test File",
"type": "node-terminal",
"request": "launch",
"command": "npm run test -- ${fileBasenameNoExtension}",
"cwd": "${fileDirname}"
}
]
}
}
27 changes: 15 additions & 12 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
.vscode/**
.vscode-test/**
test/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/jsconfig.json
**/*.map
**/.eslintrc.json

.env
.github
.vscode
.vscode-test*
coverage
node_modules
out/
src/
dist/test
.gitignore
.eslintrc.json
**/*test.js
**/*test.js.map
tsconfig.json
package-lock.json
*.vsix
TODO.md
snippets/_Test_/**
*.ts
TODO.md
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

All notable changes to the "GitHubFileFetcher" extension will be documented in this file.

## [Unreleased]

## [2.0.0]

### Refactoring

- Changed source language to TypeScript.
- Added esbuild to get Browser Editor support.
- Refactored code.

### Added

The GitHub API is limited to 60 requests per hour for non authorized requests. You can provide your GitHub username and an access token to push this limit to 5000 requests per hour. Please see the [official GitHub doc](https://docs.github.com/en/free-pro-team@latest/rest/rate-limit/rate-limit?apiVersion=2022-11-28) for further information.
You can generate the access token in your [GitHub settings](https://github.com/settings/tokens).

- Added gitHubFileFetcher.githubUsername setting.
- Added gitHubFileFetcher.githubToken setting.

## [1.0.2]

### Maintenance
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

| Status |
| ------ |
| [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/dennykorsukewitz/VSCode-GitHubFileFetcher/1.0.1/dev)](https://github.com/dennykorsukewitz/VSCode-GitHubFileFetcher/compare/1.0.1...dev) ![GitHub Workflow Lint](https://github.com/dennykorsukewitz/VSCode-GitHubFileFetcher/actions/workflows/lint.yml/badge.svg?branch=dev&style=flat&label=Lint) ![GitHub Workflow Pages](https://github.com/dennykorsukewitz/VSCode-GitHubFileFetcher/actions/workflows/pages.yml/badge.svg?branch=dev&style=flat&label=GitHub%20Pages) |
| [![GitHub commits since tagged version](https://img.shields.io/github/commits-since/dennykorsukewitz/VSCode-GitHubFileFetcher/2.0.0/dev)](https://github.com/dennykorsukewitz/VSCode-GitHubFileFetcher/compare/2.0.0...dev) ![GitHub Workflow Lint](https://github.com/dennykorsukewitz/VSCode-GitHubFileFetcher/actions/workflows/lint.yml/badge.svg?branch=dev&style=flat&label=Lint) ![GitHub Workflow Pages](https://github.com/dennykorsukewitz/VSCode-GitHubFileFetcher/actions/workflows/pages.yml/badge.svg?branch=dev&style=flat&label=GitHub%20Pages) |

## Feature

Expand Down Expand Up @@ -62,6 +62,11 @@ The following steps are performed one after the other.
| - | - | - |
| gitHubFileFetcher.informationMessages | Information messages will be displayed. | true |
| gitHubFileFetcher.repositories | List of possible GitHub repositories. GitHub {owner}/{repo}. | dennykorsukewitz/VSCode-GitHubFileFetcher |
| gitHubFileFetcher.githubUsername | GitHub username | dennykorsukewitz |
| gitHubFileFetcher.githubToken | GitHub token | 123xxx789 |

The GitHub API is limited to 60 requests per hour for non authorized requests. You can provide your GitHub username and an access token to push this limit to 5000 requests per hour. Please see the [official GitHub doc](https://docs.github.com/en/free-pro-team@latest/rest/rate-limit/rate-limit?apiVersion=2022-11-28) for further information.
You can generate the access token in your [GitHub settings](https://github.com/settings/tokens).

![Settings](doc/images/settings.png)

Expand Down
17 changes: 14 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# [1.0.2]
# [2.0.0]

- Tidied code.
- Saves the new manually entered repository globally.
## Refactoring

- Changed source language to TypeScript.
- Added esbuild to get Browser Editor support.
- Refactored code.

## Added

The GitHub API is limited to 60 requests per hour for non authorized requests. You can provide your GitHub username and an access token to push this limit to 5000 requests per hour. Please see the [official GitHub doc](https://docs.github.com/en/free-pro-team@latest/rest/rate-limit/rate-limit?apiVersion=2022-11-28) for further information.
You can generate the access token in your [GitHub settings](https://github.com/settings/tokens).

- Added gitHubFileFetcher.githubUsername setting.
- Added gitHubFileFetcher.githubToken setting.
13 changes: 0 additions & 13 deletions jsconfig.json

This file was deleted.

68 changes: 45 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "GitHubFileFetcher",
"displayName": "GitHub File Fetcher",
"description": "This extension searches and fetches files from GitHub.",
"version": "1.0.1",
"version": "2.0.0",
"publisher": "dennykorsukewitz",
"icon": "doc/images/icon.png",
"license": "SEE LICENSE IN LICENSE",
Expand Down Expand Up @@ -33,33 +33,43 @@
"Other"
],
"engines": {
"vscode": "^1.74.0"
"vscode": "^1.85.0"
},
"activationEvents": [
"onCommand:gitHubFileFetcher"
],
"main": "./src/extension",
"activationEvents": [],
"main": "./dist/extension.js",
"browser": "./dist/extension.js",
"scripts": {
"lint": "eslint .",
"lint-fix": "eslint . --fix",
"test": "node ./test/runTest.js"
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=dist/extension.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
"watch": "tsc -watch -p ./",
"compile": "tsc -p ./",
"compile-web": "npm run esbuild-base -- --sourcemap",
"lint": "eslint src --ext ts",
"lint-fix": "eslint src --ext ts --fix",
"pretest": "rm -Rf .vscode-test && npm run compile && npm run lint",
"test": "node ./dist/test/runTest.js",
"open-in-browser": "npm run compile-web && npx @vscode/test-web --extensionDevelopmentPath=."
},
"dependencies": {
"base64-to-uint8array": "^1.0.0"
},
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "16.x",
"@types/vscode": "^1.74.0",
"@vscode/test-electron": "^2.2.0",
"eslint": "^8.28.0",
"mocha": "^10.1.0",
"typescript": "^4.9.3"
},
"dependencies": {
"glob": "^8.1.0",
"node-fetch": "^2.6.9",
"path": "^0.12.7"
"@types/node": "^18.19.14",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.20.0",
"esbuild": "^0.20.0",
"eslint": "^8.56.0",
"mocha": "^10.2.0",
"typescript": "^5.3.3"
},
"vsce": {
"dependencies": true
"overrides": {
"minimatch": "5.1.2",
"glob": "8.1.0"
},
"contributes": {
"commands": [
Expand All @@ -80,6 +90,7 @@
"title": "GitHub File Fetcher",
"properties": {
"gitHubFileFetcher.informationMessages": {
"order": 1,
"type": "string",
"description": "Information messages will be displayed.",
"default": "true",
Expand All @@ -95,6 +106,7 @@
]
},
"gitHubFileFetcher.repositories": {
"order": 2,
"type": "array",
"items": {
"type": "string"
Expand All @@ -103,8 +115,18 @@
"default": [
"dennykorsukewitz/VSCode-GitHubFileFetcher"
]
},
"gitHubFileFetcher.githubUsername": {
"order": 3,
"type": "string",
"description": "The GitHub API is limited to 60 requests per hour for non authorized requests. You can provide your GitHub username and an access token to push this limit to 5000 requests per hour."
},
"gitHubFileFetcher.githubToken": {
"order": 4,
"type": "string",
"description": "The GitHub API is limited to 60 requests per hour for non authorized requests. You can provide your GitHub username and an access token to push this limit to 5000 requests per hour."
}
}
}
}
}
}
Loading

0 comments on commit f50b158

Please sign in to comment.