Skip to content

Commit

Permalink
patch(1.4.4): update engines (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunSHamilton authored Aug 19, 2022
1 parent 7833add commit cb20846
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 147 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- name: Checkout Source Files
uses: actions/checkout@v3
- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: "npm"

- name: Install Dependencies
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

## [Released]

##[1.4.4](#v1.4.4) (2022-08-19)

### Updated

- `vscode` engine to `1.70.0`
- `node` engine to `>=18`

### Changed

- Removed `axios` for native Node.js `fetch`

##[1.4.0](#v1.4.0) (2022-07-23)

### Added
Expand Down
Binary file modified freecodecamp-courses-patch.vsix
Binary file not shown.
151 changes: 23 additions & 128 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "freecodecamp-courses",
"displayName": "freeCodeCamp - Courses",
"description": "Provides tooling for quick and easy selection of courses offered by freeCodeCamp",
"version": "1.4.3",
"version": "1.4.4",
"author": "freeCodeCamp",
"publisher": "freeCodeCamp",
"galleryBanner": {
Expand All @@ -11,7 +11,8 @@
},
"icon": "images/logo-128X128.png",
"engines": {
"vscode": "^1.69.0"
"vscode": "1.70.0",
"node": ">=18.0.0"
},
"categories": [
"Education"
Expand Down Expand Up @@ -76,8 +77,8 @@
"devDependencies": {
"@types/glob": "7.2.0",
"@types/mocha": "9.1.1",
"@types/node": "14.18.23",
"@types/vscode": "1.69.1",
"@types/node": "18.7.6",
"@types/vscode": "1.70.0",
"@typescript-eslint/eslint-plugin": "5.33.0",
"@typescript-eslint/parser": "5.33.0",
"@vscode/test-electron": "2.1.5",
Expand All @@ -97,8 +98,5 @@
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/freeCodeCamp/courses-vscode-extension/issues"
},
"dependencies": {
"axios": "^0.27.0"
}
}
8 changes: 3 additions & 5 deletions src/commands/open-course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ import { promptQuickPick } from "../inputs";
import { currentDirectoryCourse } from "../components";
import { gitClone } from "../usefuls";

import axios from "axios";

export default async function openCourse() {
try {
await handleConnection();

const { courses } = (
await axios.get(
const { courses } = (await (
await fetch(
"https://raw.githubusercontent.com/freeCodeCamp/freecodecamp-courses/main/resources/courses.json"
)
).data as Courses;
).json()) as Courses;
// Check if course is already downloaded
const courseGitDownloaded = await currentDirectoryCourse();

Expand Down
3 changes: 1 addition & 2 deletions src/components.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { commands, Uri, workspace, window } from "vscode";
import { Course, FlashTypes } from "./typings";
import axios from "axios";
import { handleMessage } from "./flash";
import { PATH } from "./usefuls";

Expand Down Expand Up @@ -55,7 +54,7 @@ export async function getRootWorkspaceDir() {
*/
export async function isConnectedToInternet(): Promise<boolean> {
try {
const res = await axios.get("https://www.google.com");
const res = await fetch("https://www.google.com");
return Promise.resolve(res.status === 200);
} catch (e) {
console.log("isConnected: ", e);
Expand Down
Loading

0 comments on commit cb20846

Please sign in to comment.