Skip to content

Commit

Permalink
Merge pull request #1026 from thecartercenter/upgrade-enketo-take2
Browse files Browse the repository at this point in the history
Upgrade enketo AND node (take 2)
  • Loading branch information
cooperka authored Nov 12, 2024
2 parents 99132f5 + c29dd3a commit 5861541
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 604 deletions.
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

0 comments on commit 5861541

Please sign in to comment.