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

Upgrade enketo AND node (take 2) #1026

Merged
merged 6 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 16.13.0
node-version: 20
- name: Find yarn cache location
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: JS package cache
id: cache-packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.13.0
20
5 changes: 3 additions & 2 deletions app/controllers/responses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,9 @@ def odk_awaiting_media?

# Renders an Enketo form instead of a NEMO form.
def enketo
# Fail fast if we're on the wrong node version (this happens most often in development).
raise "Error: Unexpected Node version #{`node -v`}" unless `node -v`.match?("v16")
# Fail fast if we're on the wrong node version
# (this happens most often in development and can lead to inscrutable errors).
raise "Error: Unexpected Node version #{`node -v`}" unless `node -v`.match?("v20")

# Enketo can't render anything if we haven't rendered it to XML (e.g. unpublished draft).
if @response.form.odk_xml.blank?
Expand Down
4 changes: 3 additions & 1 deletion lib/enketo-transformer-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
"start": "node index.js"
},
"resolutions": {
"nan": "2.22.0"
},
"dependencies": {
"enketo-transformer": "2.3.0"
"enketo-transformer": "4.1.1",
"libxslt": "0.10.2"
}
}
Loading
Loading