Skip to content

Commit

Permalink
chore: improve update script (#3377)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S committed Jun 18, 2024
1 parent b5198ee commit a1a5c52
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 29 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ' 🔗 Update Dependencies Main'
name: ' 🔗 Update Dependencies'

on:
push:
Expand All @@ -8,16 +8,22 @@ on:
- '**/package.json'
- '**/package-lock.json'
workflow_dispatch:
inputs:
base:
description: The Base Ref to apply the diff
required: false
default: 'main'
schedule:
- cron: '0 12 * * 0'

env:
NEW_BRANCH: "update-dependencies-${{ inputs.base || 'main' }}"
REF_BRANCH: ${{ inputs.base || 'main' }}

jobs:
update-dependencies:
if: github.repository_owner == 'streetsidesoftware'
runs-on: ubuntu-latest
env:
NEW_BRANCH: 'update-dependencies-main'
REF_BRANCH: main
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
32 changes: 9 additions & 23 deletions Spell Checker.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,14 @@
"name": "Tools",
"path": "tools/build-tools"
},
{
"path": "packages/utils-disposables"
},
{
"path": "packages/utils-logger"
},
{
"path": "packages/json-rpc-api"
},
{
"path": "packages/webview-api"
},
{
"path": "packages/webview-rpc"
},
{
"path": "packages/webview-ui"
},
{
"name": "Docs",
"path": "docs"
}
{ "path": "packages/utils-disposables" },
{ "path": "packages/utils-logger" },
{ "path": "packages/json-rpc-api" },
{ "path": "packages/webview-api" },
{ "path": "packages/webview-rpc" },
{ "path": "packages/webview-ui" },
{ "name": "Docs", "path": "docs" },
{ "path": "website" }
],
"settings": {
"cSpell.import": ["${workspaceFolder:Spell Checker Root}/cspell.config.yaml"],
Expand All @@ -58,7 +44,7 @@
"editor.formatOnSave": true,
"files.eol": "\n",
"cSpell.flagWords": [],
"cSpell.enableFiletypes": ["github-actions-workflow"],
"cSpell.enabledFileTypes": { "github-actions-workflow": true },
"svg.preview.background": "dark-transparent"
},
"launch": {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3995,7 +3995,9 @@
"lint-docs-ci": "prettier -c \"docs/**/*.{md,markdown,yaml,yml,json,html,htm,js,ts}\"",
"test-client-integration": "npm --workspace=@internal/integration-tests run test-integration",
"test": "npm --workspaces --if-present run test && echo OK",
"update-packages": "npx npm-check-updates --root -ws --target semver -u && npm i",
"update-packages": "npm run update:packages:root && npm run update:packages:website",
"update:packages:root": "npx npm-check-updates --root -ws --target semver -u && npm i",
"update:packages:website": "cd website && npm run update-packages",
"preinstall": "npx only-allow npm"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"gen-docs": "npm run gen-commands && npm run gen-config",
"gen-commands": "node ./_scripts/extract-commands.mjs > ./docs/auto_commands.md",
"gen-config": "node ./_scripts/extract-config.mjs > ./docs/auto_configuration.md",
"typecheck": "tsc"
"typecheck": "tsc",
"update-packages": "npx npm-check-updates --target semver -u && npm i"
},
"dependencies": {
"@docusaurus/core": "3.3.2",
Expand Down

0 comments on commit a1a5c52

Please sign in to comment.