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

Update dependency @types/node to v14.17.32 #229

Merged
merged 2 commits into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Merge branch 'master' into renovate/node-14.x
  • Loading branch information
foxundermoon committed Nov 6, 2021
commit 819246591b75da206b9bc127e0e34036bb89da98
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trigger:
# no `pr` keyword because we want all PRs to run this

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-20.04

steps:
# for convenience, we tag CI-produced packages with a version number
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
displayName: 'Run tests'
- job: Linux
pool:
name: Hosted Ubuntu 1604
name: Hosted Ubuntu latest
demands: npm
steps:
- task: NodeTool@0
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trigger: none
pr: none

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-20.04

steps:
# release version should be correctly set in package.json
Expand Down
6 changes: 3 additions & 3 deletions .azure-pipelines/github-release/package-lock.json

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

2 changes: 1 addition & 1 deletion .azure-pipelines/release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trigger: none
pr: none

pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-20.04

steps:
# release version should be correctly set in package.json
Expand Down
16 changes: 8 additions & 8 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# These are supported funding model platforms

github: # foxundermoon # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: foxmn # Replace with a single Patreon username
# patreon: foxmn # Replace with a single Patreon username
open_collective: vsformat # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: foxundermoon # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: [] # 'https://www.paypal.me/foxmn' Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
# ko_fi: # Replace with a single Ko-fi username
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: foxundermoon # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# custom: [] # 'https://www.paypal.me/foxmn' Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
140 changes: 140 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: CD

on:
push:
branches:
- master

jobs:
unit-test:
name: Test
runs-on: ${{ matrix.config.os }} # we run many different builds
strategy:
matrix:
config:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
steps:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn
- run: yarn format-check
- run: yarn test-compile
- run: yarn compile
# https://github.com/GabrielBB/xvfb-action
- name: Run headless test
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test
release:
name: release
runs-on: ubuntu-latest
needs: unit-test
steps:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: read version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$PACKAGE_VERSION"
PUBLISHED_VERSION=$(curl 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery' \
-H 'origin: https://marketplace.visualstudio.com' \
-H 'pragma: no-cache' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36' \
-H 'content-type: application/json' \
-H 'accept: application/json;api-version=5.1-preview.1;excludeUrls=true' \
-H 'cache-control: no-cache' \-H 'authority: marketplace.visualstudio.com' \
-H 'referer: https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format' \
--data-binary '{"assetTypes":null,"filters":[{"criteria":[{"filterType":7,"value":"foxundermoon.shell-format"}],"direction":2,"pageSize":1,"pageNumber":1,"sortBy":0,"sortOrder":0,"pagingToken":null}],"flags":71}' |
jq '.results[0].extensions[0].versions[0].version')
echo "PUBLISHED_VERSION=$PUBLISHED_VERSION"
if [ "$PACKAGE_VERSION" = "$PUBLISHED_VERSION" ]; then
echo 'niddend published'
echo "NEED_RELEASE=no" >> $GITHUB_ENV
else
echo "need publish"
echo "NEED_RELEASE=yes" >> $GITHUB_ENV
fi
- run: yarn
if: env.NEED_RELEASE == 'yes'
- name: mini changelog
if: env.NEED_RELEASE == 'yes'
id: minichangelog
run: |
VERSION_REGEX="## $(echo ${{ env.PACKAGE_VERSION }} | sed 's/\./\\./g')"
sed -n "/$VERSION_REGEX/,/## /p" CHANGELOG.md | sed '$d' > minichangelog.txt
cat minichangelog.txt
echo "::set-output name=minichangelog::$(cat minichangelog.txt)

- name: check changelog
if: env.NEED_RELEASE == 'yes'
run: |
LINE_COUNT=$(cat minichangelog.txt | wc -l)
if [ "$LINE_COUNT" -lt 3 ]; then
echo Mini changelog is too short. Did you use the wrong version number in CHANGELOG.txt?
exit 1
fi
- name: package
if: env.NEED_RELEASE == 'yes'
run: |
yarn package
echo FILE_NAME=$(node -p "require('./package.json').name")-${{ env.PACKAGE_VERSION }}.vsix
- name: create github release
if: env.NEED_RELEASE == 'yes'
id: create_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.PACKAGE_VERSION }}
release_name: Release ${{ env.PACKAGE_VERSION }}
body: |
${{ steps.minichangelog.outputs.minichangelog }}
draft: false
prerelease: false
- name: Upload Release Asset
if: env.NEED_RELEASE == 'yes'
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./${{ env.FILE_NAME }}
asset_name: ${{ env.FILE_NAME }}
asset_content_type: application/gzip
- name: Vscode release plugin
uses: JCofman/vscodeaction@master
if: env.NEED_RELEASE == 'yes'
env:
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
with:
args: publish -p $PUBLISHER_TOKEN
46 changes: 46 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on:
push:
paths-ignore:
- CHANGELOG.md
- README.md
pull_request:
paths-ignore:
- CHANGELOG.md
- README.md

jobs:
unit-test:
name: Test
runs-on: ${{ matrix.config.os }} # we run many different builds
strategy:
matrix:
config:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
steps:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn
- run: yarn format-check
- run: yarn test-compile
- run: yarn compile
# https://github.com/GabrielBB/xvfb-action
- name: Run headless test
uses: GabrielBB/xvfb-action@v1
with:
run: yarn test
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

Check [Keep a Changelog](https://keepachangelog.com/) for recommendations on how to structure this file.

## 7.2.0

- bats files support

## 7.1.1

- bump shfmt to 3.3.1

## 7.1.0

- bump shfmt to 3.2.4
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

The MIT License (MIT)

Copyright (c) 2015 gatsbyjs
Copyright (c) 2017 vs-shell-format

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


[Get it on the VS Code Marketplace!](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format)

# supported file types or languages
Expand All @@ -12,6 +10,7 @@
| properties | .properties | java properties files |
| jvmoptions | .vmoptions , jvm.options | jvm options file |
| hosts | /etc/hosts | hosts file |
| bats | .bats | Bats test file |

---

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.