diff --git a/.eslintignore b/.eslintignore index 92bb86e4e5..33ce966b54 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,8 +1,10 @@ # Ignore miscellaneous folders .github/ .idea/ +.husky/ .vscode/ .yarn/ -node_modules/ +coverage/ dist/ +node_modules/ tmp/ diff --git a/.eslintrc.json b/.eslintrc.json index c16b7a9f2d..1b54175092 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,6 +7,12 @@ "node": true }, "overrides": [ + { + "files": ["*.js"], + "parserOptions": { + "sourceType": "module" + } + }, { "files": ["*.ts"], "parser": "@typescript-eslint/parser", diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 302f1e996d..a523a38e47 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -2,13 +2,15 @@ name: CI Workflow on: push: - branches: - - '**' # trigger on all branches + # trigger on all branches except for dependabot-triggered push events + branches-ignore: [ dependabot/** ] tags: - 'v*' # trigger on all tags paths-ignore: - '**.md' # ignore changes in markdown files pull_request: + branches: [ develop ] + types: [ opened, synchronize, reopened ] jobs: test: @@ -17,14 +19,16 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node-version: [12, 14.16, 16] + node-version: [12, 14.17, 16] steps: - name: Checkout repo uses: actions/checkout@v2 + with: + fetch-depth: 0 # Get all history and branches - name: Set up node ${{ matrix.node-version}} - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node-version }} cache: 'yarn' @@ -38,12 +42,19 @@ jobs: yarn run test:ci - name: Upload code coverage - if: matrix.node-version == 14.16 # upload coverage report for current node version only - uses: codecov/codecov-action@v2.0.3 + if: matrix.node-version == 14.17 # upload coverage report for current node version only + uses: codecov/codecov-action@v2.1.0 with: flags: unittests env_vars: ${{ matrix.os }}, ${{ matrix.node-version }} + - name: Perform SonarCloud Analysis + if: matrix.node-version == 14.17 # upload coverage report for current node version only + uses: SonarSource/sonarcloud-github-action@v1.6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Test build for GH Pages (Node < v16) if: matrix.node-version != 16 run: | @@ -67,14 +78,14 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node-version: [ 14.16 ] + node-version: [ 14.17 ] steps: - name: Checkout repo uses: actions/checkout@v2 - name: Set up node ${{ matrix.node-version}} - uses: actions/setup-node@v2.4.0 + uses: actions/setup-node@v2.4.1 with: node-version: ${{ matrix.node-version }} cache: 'yarn' @@ -104,23 +115,23 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - node-version: [ 14.16 ] + node-version: [ 14.17 ] steps: - - name: Get tag version - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} - - - name: Create Release - id: create_release - if: ${{ success() && startsWith(github.ref, 'refs/tags/') }} - uses: softprops/action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAG_VERSION: ${{ steps.get_version.outputs.VERSION }} - with: - name: Release ${{ env.TAG_VERSION }} - body: "A prototype web application for the online edition of the [Anton Webern Gesamtausgabe](https://www.anton-webern.ch), located at the Musicological Seminar of the University of Basel. It is written in [Angular](https://angular.io/) and runs on [edition.anton-webern.ch](https://edition.anton-webern.ch).\n\n + - name: Get tag version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} + + - name: Create Release + id: create_release + if: ${{ success() && startsWith(github.ref, 'refs/tags/') }} + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG_VERSION: ${{ steps.get_version.outputs.VERSION }} + with: + name: Release ${{ env.TAG_VERSION }} + body: "A prototype web application for the online edition of the [Anton Webern Gesamtausgabe](https://www.anton-webern.ch), located at the Musicological Seminar of the University of Basel. It is written in [Angular](https://angular.io/) and runs on [edition.anton-webern.ch](https://edition.anton-webern.ch).\n\n Changes since last release: https://github.com/${{ github.repository }}/blob/${{ env.TAG_VERSION }}/CHANGELOG.md" - draft: false - prerelease: false + draft: false + prerelease: false diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0a73d9a48f..97c180745b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -6,15 +6,14 @@ name: 'CodeQL' on: - pull_request: - branches: [ develop ] push: - branches: - - '**' + # Dependabot triggered push events have read-only access, but uploading code + # scanning requires write access. + branches-ignore: [ dependabot/** ] tags-ignore: - '*' - paths-ignore: - - '**.md' # ignore changes to markdown files + pull_request: + branches: [ develop ] jobs: analyze: diff --git a/.prettierrc.json b/.prettierrc.json index 72ac122ed4..bc31dd18a5 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -6,6 +6,6 @@ "trailingComma": "es5", "bracketSpacing": true, "arrowParens": "avoid", - "jsxBracketSameLine": true, + "bracketSameLine": true, "printWidth": 120 } diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ea43340f..8c370dfcf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,121 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.7.17](https://github.com/webern-unibas-ch/awg-app/compare/v0.7.16...v0.7.17) (2021-11-15) + + +### Bug Fixes + +* **app:** add 'scope' attribute to tags (SonarCloud analysis fix) ([4d6be54](https://github.com/webern-unibas-ch/awg-app/commit/4d6be54a17f65658af6933172f5d45ac308421fb)) +* **app:** add a description to tables (SonarCloud analysis fix) ([6f1512b](https://github.com/webern-unibas-ch/awg-app/commit/6f1512bb7f22e1a0d1b9e01e078a184e5604f61f)) +* **app:** fix regex for SALSAH resource ids ([522a438](https://github.com/webern-unibas-ch/awg-app/commit/522a438e4477987fe532a104b8586b05277092d8)) +* **app:** fix regex for SALSAH resource ids again ([c3636a2](https://github.com/webern-unibas-ch/awg-app/commit/c3636a2a73fd07d089e16b2859284505b2ab6490)) +* **app:** fix unexpected empty arrow functions (SonarCloud analysis fix) ([17e0aaa](https://github.com/webern-unibas-ch/awg-app/commit/17e0aaa5c1ee750f11bce72fb4ac5f4946c7fe09)) +* **app:** fix unexpected empty arrow functions (SonarCloud analysis fix) ([008ec50](https://github.com/webern-unibas-ch/awg-app/commit/008ec507a5614c87abad4faf229ade5ff71ea45c)) +* **app:** remove empty methodds (SonarCloud analysis fix) ([155b9d7](https://github.com/webern-unibas-ch/awg-app/commit/155b9d78855dfaeea7fb6c592feed295761713ef)) +* **app:** replace `` tags by `` (SonarCloud analysis fix) ([b7d3863](https://github.com/webern-unibas-ch/awg-app/commit/b7d3863cb51408cf5ca5df42ea09d28554e50a1a)) +* **app:** simplify import of converter plugins ([d14c742](https://github.com/webern-unibas-ch/awg-app/commit/d14c742df5b20cecea4c1cc9b799f18352488271)) +* **app:** use forEach instead of map if no return value (SonarCloud fix) ([e37f620](https://github.com/webern-unibas-ch/awg-app/commit/e37f620b6bc93676656733a7223cddfb997635d6)) +* **app:** use https links instead of http (SonarCloud analysis fix) ([9369b02](https://github.com/webern-unibas-ch/awg-app/commit/9369b029fff93af7fd971cb7d111398d4416951b)) +* **assets:** fix import of js plugins ([4de3d16](https://github.com/webern-unibas-ch/awg-app/commit/4de3d16bb21953dd025fe7e896b514f767591193)) +* **assets:** replace `` tags by `` (SonarCloud analysis fix) ([0ab4b22](https://github.com/webern-unibas-ch/awg-app/commit/0ab4b22242a429b07dcd4fd4e7f8ad66e6ceb5fd)) +* **assets:** use let/const instead of var in dateConverter (SonarCloud) ([1f56bd7](https://github.com/webern-unibas-ch/awg-app/commit/1f56bd79ea389bbcab7877c0d86d5f25ca2ef407)) +* **assets:** use let/const instead of var in htmlConverter (SonarCloud) ([53c0066](https://github.com/webern-unibas-ch/awg-app/commit/53c00660d1c45e3257697d6493a60dc0b2f13aa7)) +* **core:** continue with regex ([66b88fd](https://github.com/webern-unibas-ch/awg-app/commit/66b88fd583d0266f45ffe6cd6abc0d69a80a6a4b)) +* **edition:** add interface for cmConfig type ([8aea522](https://github.com/webern-unibas-ch/awg-app/commit/8aea522f6980ba6cf1594ba786122c43a92c3872)) +* **edition:** fix calculation of graph nodes' default radius ([fbfeb99](https://github.com/webern-unibas-ch/awg-app/commit/fbfeb99a5de10d021fa93a0723b87e4a008608bf)) +* **edition:** improve handling of namespaces in GraphVisualizer ([5a22ab5](https://github.com/webern-unibas-ch/awg-app/commit/5a22ab525a7b30f9c821ec341308f80ed3007e9d)) +* **edition:** move NamespaceTypes to model file ([c65d1d2](https://github.com/webern-unibas-ch/awg-app/commit/c65d1d2df8ac9ef669e5e2aa22dcb5d6e95c7c86)) +* **page-not-found:** add 'alt' attribute to `` (SonarCloud analysis) ([b50e533](https://github.com/webern-unibas-ch/awg-app/commit/b50e5339469137e6caa5ee84fdf642dfda32d377)) +* **search:** improve handling of GND events ([ca69a06](https://github.com/webern-unibas-ch/awg-app/commit/ca69a069574bcafc383d397bdcbab16dfa05332a)) +* **search:** replace linkedObj table with `