Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: City-of-Helsinki/paatokset-search
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.1.2
Choose a base ref
...
head repository: City-of-Helsinki/paatokset-search
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Loading
Showing with 15,441 additions and 45,610 deletions.
  1. +61 −0 .github/workflows/npm-audit.yml
  2. +1 −1 .nvmrc
  3. +21 −0 LICENSE
  4. +4 −0 README.md
  5. +14,842 −45,369 package-lock.json
  6. +29 −0 src/common/components/form/SearchBarAutocomplete.tsx
  7. +0 −4 src/common/components/form/SearchBarWrapper.module.scss
  8. +4 −9 src/common/styles/Form.module.scss
  9. +7 −7 src/locales/locales.json
  10. +3 −3 src/modules/decisions/SearchContainer.tsx
  11. +193 −80 src/modules/decisions/components/form/FormContainer.tsx
  12. +8 −18 src/modules/decisions/components/form/SearchBar.tsx
  13. +3 −12 src/modules/decisions/components/form/SubmitButton.tsx
  14. +1 −1 src/modules/decisions/components/form/filters/DMSelect.tsx
  15. +127 −0 src/modules/decisions/components/form/filters/DecisionmakerSelect.tsx
  16. +42 −30 src/modules/decisions/components/form/filters/SelectedFiltersContainer.tsx
  17. +8 −8 src/modules/decisions/components/results/ResultsContainer.tsx
  18. +8 −1 src/modules/decisions/enum/IndexFields.ts
  19. +10 −10 src/modules/decisions/enum/SectorMap.ts
  20. +16 −0 src/modules/decisions/types/types.ts
  21. +0 −6 src/modules/frontpage/components/form/FormContainer.tsx
  22. +11 −5 src/modules/policymakers/components/form/FormContainer.tsx
  23. +14 −19 src/modules/policymakers/components/form/SearchBar.tsx
  24. +2 −13 src/modules/policymakers/components/form/SubmitButton.tsx
  25. +4 −7 src/modules/policymakers/components/results/ResultCard.tsx
  26. +16 −5 src/modules/policymakers/components/results/ResultsContainer.tsx
  27. +6 −2 src/modules/policymakers/enum/IndexFields.ts
61 changes: 61 additions & 0 deletions .github/workflows/npm-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Npm audit

on:
workflow_dispatch:
schedule:
- cron: '0 12 * * 0' # Run every fortnight on Sunday at 12

jobs:
npm_audit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run npm audit
id: npm_audit
run: |
node_version=$(cat .nvmrc)
echo "Using Node.js version $node_version"
export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install $node_version
nvm use $node_version
npm install --silent
set +e
npm audit --package-lock-only --loglevel=error;
# The npm audit command will exit with a 0 exit code if no vulnerabilities were found.
if [ $? -gt 0 ]; then
npm audit fix --package-lock-only --loglevel=error;
if [ $? -gt 0 ]; then
echo "BC_BREAK=:exclamation: NPM Audit fix could not fix all vulnerabilities. Fix them manually by running \`npm audit fix --force\` and test the functionalities thoroughly as there might be breaking changes. :exclamation:" >> $GITHUB_ENV;
fi;
echo "CREATE_PR=true" >> $GITHUB_OUTPUT;
fi;
set -e
- name: Create Pull Request
if: steps.npm_audit.outputs.CREATE_PR == 'true'
uses: peter-evans/create-pull-request@v4
with:
committer: GitHub <noreply@github.com>
author: actions-bot <actions-bot@users.noreply.github.com>
commit-message: Updated node modules based on npm audit fix
title: Automatic npm audit fix
labels: auto-update
body: |
# Npm audit
${{ env.BC_BREAK }}
## How to install
* Run `nvm use && npm i && npm run start`
## How to test
Run `npm audit`
* [ ] Check that the `npm audit` prints `found 0 vulnerabilities`
* [ ] Check that the changes for distributed files are sensible
branch: automation/npm-audit
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/iron
22
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 City of Helsinki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,8 +5,12 @@ First, make sure you have installed the helfi-paatokset project and have set it
## Getting started

```console
foo@bar:~$ nvm use
foo@bar:~$ npm i
foo@bar:~$ npm start

# In case of ERR_OSSL_EVP_UNSUPPOERTED error, instead of 'npm start' run:
NODE_OPTIONS=--openssl-legacy-provider npm start
```

Make sure your elastic container is up and running.
Loading