add nodejs v18 compatibility

This commit is contained in:
lesion 2023-01-10 17:58:03 +01:00
parent 550e221f4a
commit ca94c730a6
No known key found for this signature in database
GPG key ID: 352918250B012177
3 changed files with 40 additions and 7 deletions

View file

@ -1,8 +1,12 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
### ### UNRELEASED
- models initialization refactored, better dev experience as backend hmr is working
- models initialization refactored, better dev xperience as backend hmr is working - add swipe gesture to move to next/prev event
- fix refresh collections, fix #219
- add russian translation (thanks @drunkod)
- refactor search / filter / selection fix #225, 227, #224
- add nodejs v18 compatibility
### 1.6.1 - 15 dec '22 ### 1.6.1 - 15 dec '22
- allow edit tags in admin panel, fix #170 - allow edit tags in admin panel, fix #170

View file

@ -4,9 +4,9 @@
"description": "A shared agenda for local communities", "description": "A shared agenda for local communities",
"author": "lesion", "author": "lesion",
"scripts": { "scripts": {
"build": "nuxt build --modern", "build": "export NODE_OPTIONS=--openssl-legacy-provider; nuxt build --modern",
"start:inspect": "NODE_ENV=production node --inspect node_modules/.bin/nuxt start --modern", "start:inspect": "NODE_ENV=production node --inspect node_modules/.bin/nuxt start --modern",
"dev": "nuxt dev", "dev": "export NODE_OPTIONS=--openssl-legacy-provider; nuxt dev",
"test-sqlite": "export NODE_ENV=test; export DB=sqlite; jest --testEnvironment=jest-environment-node --bail=1", "test-sqlite": "export NODE_ENV=test; export DB=sqlite; jest --testEnvironment=jest-environment-node --bail=1",
"test-mariadb": "export NODE_ENV=test; export DB=mariadb; jest --testEnvironment=jest-environment-node --bail=1", "test-mariadb": "export NODE_ENV=test; export DB=mariadb; jest --testEnvironment=jest-environment-node --bail=1",
"test-postgresql": "export NODE_ENV=test; export DB=postgresql; jest --testEnvironment=jest-environment-node --bail=1", "test-postgresql": "export NODE_ENV=test; export DB=postgresql; jest --testEnvironment=jest-environment-node --bail=1",
@ -27,10 +27,11 @@
"locales/", "locales/",
"store/", "store/",
".nuxt/", ".nuxt/",
"gancio_plugins",
"yarn.lock" "yarn.lock"
], ],
"engines": { "engines": {
"node": ">=14 <=16" "node": ">=14 <=18"
}, },
"dependencies": { "dependencies": {
"@mdi/js": "^7.1.96", "@mdi/js": "^7.1.96",

View file

@ -415,5 +415,33 @@ describe('Collection', () => {
expect(response.body.length).toBe(1) expect(response.body.length).toBe(1)
}) })
})
describe('Geocoding', () => {
test('should not be enabled by default', async () => {
await request(app)
.post('/api/settings')
.send({ key: 'allow_geolocation', value: false })
.auth(token.access_token, { type: 'bearer' })
.expect(200)
const response = await request(app).get('/api/placeOSM/Nominatim/test')
.expect(403)
expect(response.body).toBeDefined()
}) })
test('should geocode when enabled', async () => {
await request(app)
.post('/api/settings')
.send({ key: 'allow_geolocation', value: true })
.auth(token.access_token, { type: 'bearer' })
.expect(200)
const response = await request(app).get('/api/placeOSM/Nominatim/test')
.expect(200)
expect(response.body).toBeDefined()
})
})