From 61e54272e8238f112a23eeec2bc087cf1873e762 Mon Sep 17 00:00:00 2001 From: Ian Morland Date: Mon, 30 Jan 2023 08:57:59 +0000 Subject: [PATCH] chore: npm audit fix, update build.yml --- .github/workflows/build.yml | 42 +++++++++++++------------------------ js/package-lock.json | 12 +++++------ 2 files changed, 20 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d106499..ca3526b 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,32 +1,18 @@ -name: JavaScript +name: Javascript -on: - push: - branches: - - master +on: [workflow_dispatch, push, pull_request] jobs: - build: - name: JS / Build - runs-on: ubuntu-latest + run: + uses: flarum/framework/.github/workflows/REUSABLE_frontend.yml@main + with: + enable_bundlewatch: false + enable_prettier: true + enable_typescript: false - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Restore npm cache - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('js/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - # Our action will install npm, cd into `./js`, run `npm run build` and - # `npm run build-typings`, then commit and upload any changes - - name: Build production JS - uses: flarum/action-build@2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - build_script: build - package_manager: npm + frontend_directory: ./js + backend_directory: . + js_package_manager: npm + main_git_branch: master + secrets: + bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} diff --git a/js/package-lock.json b/js/package-lock.json index 9133957..d717359 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -2742,9 +2742,9 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "bin": { "json5": "lib/cli.js" }, @@ -5649,9 +5649,9 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "kind-of": { "version": "6.0.3",