Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependabot/npm and yarn/ejs 3.1.7 #2656

Open
wants to merge 21 commits into
base: dependabot/npm_and_yarn/ejs-3.1.7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ on:
description: "Publish on Visual Studio Marketplace?"
required: true
type: choice
default: "yes"
default: "no"
options:
- "yes"
- "no"
publishOpenVSX:
description: "Publish on Open VSX Registry?"
required: true
type: choice
default: "yes"
default: "no"
options:
- "yes"
- "no"
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup Git
run: |
git config --global user.name "Release Bot"
git config --global user.email "no-replay@github.com"
git config --global user.email "no-noreply@github.com"
- name: Get Current Version Number
run: |
CURRENT_VERSION=$(cat package.json | jq .version | cut -d'"' -f 2)
Expand All @@ -90,21 +90,21 @@ jobs:
if: ${{ github.event.inputs.releaseChannel == 'stable' }}
- name: Version Package
run: |
git checkout .
npm version $RELEASE_VERSION
git tag -a $RELEASE_VERSION -m "$RELEASE_VERSION"
- name: Package Extension (Edge)
if: ${{ github.event.inputs.releaseChannel == 'edge' }}
run: |
node .github/scripts/updateEdgeVersion.js
yarn vsce package --pre-release --yarn --no-git-tag-version --no-update-package-json -o "./live-server-$RELEASE_VERSION.vsix" ${{ github.event.inputs.additionalFlags }}
npx vsce package --pre-release --no-git-tag-version --no-update-package-json -o "./live-server-$RELEASE_VERSION.vsix" ${{ github.event.inputs.additionalFlags }}
- name: Package Extension (Stable)
run: yarn vsce package $RELEASE_VERSION --yarn --no-git-tag-version --no-update-package-json -o "./live-server-$RELEASE_VERSION.vsix" ${{ github.event.inputs.additionalFlags }}
run: npx vsce package $RELEASE_VERSION --no-git-tag-version --no-update-package-json -o "./live-server-$RELEASE_VERSION.vsix" ${{ github.event.inputs.additionalFlags }}
if: ${{ github.event.inputs.releaseChannel == 'stable' }}
- name: Publish to Visual Studio Marketplace (Edge)
run: yarn vsce publish --packagePath "./live-server-$RELEASE_VERSION.vsix" --pre-release --yarn --no-git-tag-version --no-update-package-json -p ${{ secrets.VSC_MKTP_PAT }} ${{ github.event.inputs.additionalFlags }}
run: npx vsce publish --packagePath "./live-server-$RELEASE_VERSION.vsix" --pre-release --no-git-tag-version --no-update-package-json -p ${{ secrets.VSC_MKTP_PAT }} ${{ github.event.inputs.additionalFlags }}
if: ${{ github.event.inputs.publishMarketplace == 'yes' && github.event.inputs.releaseChannel == 'edge' }}
- name: Publish to Visual Studio Marketplace (Stable)
run: yarn vsce publish --packagePath "./live-server-$RELEASE_VERSION.vsix" --yarn --no-git-tag-version --no-update-package-json -p ${{ secrets.VSC_MKTP_PAT }} ${{ github.event.inputs.additionalFlags }}
run: npx vsce publish --packagePath "./live-server-$RELEASE_VERSION.vsix" --no-git-tag-version --no-update-package-json -p ${{ secrets.VSC_MKTP_PAT }} ${{ github.event.inputs.additionalFlags }}
if: ${{ github.event.inputs.publishMarketplace == 'yes' && github.event.inputs.releaseChannel == 'stable' }}
- name: Publish to Open VSX Registry (Edge)
uses: HaaLeo/publish-vscode-extension@v1
Expand All @@ -123,7 +123,7 @@ jobs:
- name: Push Tags
run: |
git log -1 --stat
git push origin main --tags
git push origin master --tags
- run: |
export GIT_TAG=$(git describe --tags --abbrev=0)
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- main
- master
pull_request:

jobs:
Expand All @@ -28,6 +28,7 @@ jobs:
if: matrix.os != 'ubuntu-latest'
with:
run: npm test
options: "-screen 0 1600x1200x24"
- name: Run Tests
uses: GabrielBB/xvfb-action@v1
if: matrix.os == 'ubuntu-latest'
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ _site
Gemfile.lock
**/*.vsix
.vscode-test
.wdio-vscode-service
.wdio-vscode-service
*-CHANGELOG.txt
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.vscode/**
.vscode-test/**
.wdio-vscode-service/**
out/test/**
test/**
src/**
Expand Down
4 changes: 2 additions & 2 deletions lib/live-server/injected.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Code injected by live-server -->
<script type="text/javascript">
<script>
// <![CDATA[ <-- For SVG support
if ('WebSocket' in window) {
(function () {
Expand Down Expand Up @@ -35,4 +35,4 @@
console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
}
// ]]>
</script>
</script>
47 changes: 22 additions & 25 deletions package-lock.json

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

17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "LiveServer",
"displayName": "Live Server",
"description": "Launch a development local Server with live reload feature for static & dynamic pages",
"version": "5.7.5",
"version": "5.7.9",
"publisher": "ritwickdey",
"author": {
"name": "Ritwick Dey",
Expand Down Expand Up @@ -115,11 +115,6 @@
"pattern": "/|/[^\\/]",
"description": "Set Custom root of Live Server. \nTo change root the the server to sub folder of workspace, use '/' and relative path from workspace. \nExample: /subfolder1/subfolder2"
},
"liveServer.settings.useBrowserPreview": {
"type": "boolean",
"default": false,
"description": "Open in Browser Preview inside VS Code, instead of default browser"
},
"liveServer.settings.CustomBrowser": {
"type": [
"string",
Expand Down Expand Up @@ -350,7 +345,8 @@
"tslint": "^6.1.3",
"typescript": "^4.5.4",
"vsce": "^2.7.0",
"wdio-vscode-service": "^2.0.1"
"wdio-vscode-service": "^2.0.1",
"es5-ext": "0.10.53"
},
"dependencies": {
"http-shutdown": "^1.2.0",
Expand All @@ -359,8 +355,11 @@
"opn": "^6.0.0",
"vsls": "^0.3.967"
},
"overrides": {
"es5-ext": "0.10.53"
},
"announcement": {
"onVersion": "5.7.5",
"message": "[NEW] [email protected].5: Changed extension activationEvents to onStartupFinished."
"onVersion": "5.7.9",
"message": "[NEW] [email protected].9: Activation load time improved"
}
}
8 changes: 2 additions & 6 deletions src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ export class Config {
return Config.getSettings<boolean>('NoBrowser');
}

public static get getUseBrowserPreview(): boolean {
return Config.getSettings<boolean>('useBrowserPreview');
}

public static get getAdvancedBrowserCmdline(): string {
return Config.getSettings<string>('AdvanceCustomBrowserCmdLine');
}
Expand Down Expand Up @@ -121,11 +117,11 @@ export class Config {
return Config.getSettings<string>('file');
}

public static get getMutiRootWorkspaceName(): string {
public static get getMultiRootWorkspaceName(): string {
return Config.getSettings<string>('multiRootWorkspaceName');
}

public static setMutiRootWorkspaceName(val: string) {
public static setMultiRootWorkspaceName(val: string) {
return Config.configuration.update('multiRootWorkspaceName', val, false);
}
}
6 changes: 3 additions & 3 deletions src/Helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as fs from 'fs';
import * as path from 'path';
import { Config } from './Config';

export const SUPPRORTED_EXT: string[] = [
export const SUPPORTED_EXT: string[] = [
'.html', '.htm', '.svg'
];

Expand Down Expand Up @@ -65,7 +65,7 @@ export class Helper {
*/
public static IsSupportedFile(file: string): boolean {
let ext = path.extname(file) || (file.startsWith('.') ? file : `.${file}`);
return SUPPRORTED_EXT.indexOf(ext.toLowerCase()) > -1;
return SUPPORTED_EXT.indexOf(ext.toLowerCase()) > -1;
}


Expand Down Expand Up @@ -153,4 +153,4 @@ export class Helper {

return proxy;
}
}
}
8 changes: 3 additions & 5 deletions src/LiveServerHelper.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
'use strict';
const liveServer = require('live-server');
const httpShutdown = require('http-shutdown');

export class LiveServerHelper {

static StartServer(params, callback) {
setTimeout(() => {
try {
let ServerInstance = liveServer.start(params);
let ServerInstance = require('live-server').start(params);
setTimeout(() => {

if (!ServerInstance._connectionKey) {
return callback({});
}

httpShutdown(ServerInstance);
require('http-shutdown')(ServerInstance);
return callback(ServerInstance);

}, 1000);
Expand All @@ -34,7 +32,7 @@ export class LiveServerHelper {
// callback(); /*only Working first time, Unknown Bug*/
});
LiveServerInstance.close();
liveServer.shutdown();
require('live-server').shutdown();
setTimeout(() => { callback(); }, 1000);
}
}
15 changes: 7 additions & 8 deletions src/announcement/index.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
import { Memento, extensions, window } from 'vscode';
import * as opn from 'opn';

export const SETUP_STRING = 'liveServer.setup.version';

export async function checkNewAnnouncement(memento: Memento) {

const packageJSON = extensions.getExtension('ritwickdey.LiveServer').packageJSON;
const announment = packageJSON.announcement;
const announcement = packageJSON.announcement;

if (!announment && Object.keys(announment).length === 0) return;
if (!announcement && Object.keys(announcement).length === 0) return;

const stateVersion = await memento.get(SETUP_STRING) || '0.0.0';
const installedVersion = packageJSON.version;

if (stateVersion !== installedVersion && installedVersion === announment.onVersion) {
if (stateVersion !== installedVersion && installedVersion === announcement.onVersion) {
await memento.update(SETUP_STRING, installedVersion);
const showDetails = 'Show Details';
const choice = await window.showInformationMessage(announment.message, showDetails);
const choice = await window.showInformationMessage(announcement.message, showDetails);
if (choice === showDetails) {
const url = announment.url || 'https://github.com/ritwickdey/vscode-live-server';
opn(url);
const url = announcement.url || 'https://github.com/ritwickdey/vscode-live-server';
require('opn')(url);
}

}

}
}
Loading