Skip to content

Commit

Permalink
chore: update ogc-client
Browse files Browse the repository at this point in the history
Several more dependencies are now only available in ESM only, so they need to
be transformed for Jest.
  • Loading branch information
jahow committed Sep 15, 2024
1 parent 694b760 commit 15f8c8e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 54 deletions.
15 changes: 14 additions & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
const nxPreset = require('@nx/jest/preset').default

const npmDependenciesOnlyInEsm = [
'color-*',
'ol',
'@mapbox',
'@geospatial-sdk',
'@camptocamp/ogc-client',
'node-fetch',
'data-uri-to-buffer',
'fetch-blob',
'formdata-polyfill',
'.*.mjs',
]

module.exports = {
...nxPreset,
coverageReporters: ['text'],
setupFiles: ['jest-canvas-mock'],
transformIgnorePatterns: [
'node_modules/(?!(color-*|ol|@mapbox|@geospatial-sdk|@camptocamp/ogc-client|.*.mjs$))',
`node_modules/(?!(${npmDependenciesOnlyInEsm.join('|')}))`,
],
transform: {
'^.+\\.(ts|mjs|js|html)$': [
Expand Down
74 changes: 23 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@angular/router": "^16.2",
"@bartholomej/ngx-translate-extract": "^8.0.2",
"@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
"@camptocamp/ogc-client": "1.1.1-dev.ad6d9ab",
"@camptocamp/ogc-client": "1.1.1-dev.c75dcba",
"@geospatial-sdk/core": "^0.0.5-dev.20",
"@geospatial-sdk/geocoding": "^0.0.5-dev.20",
"@geospatial-sdk/openlayers": "^0.0.5-dev.20",
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"dependencies": {
"@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
"@camptocamp/ogc-client": "1.1.1-dev.ad6d9ab",
"@camptocamp/ogc-client": "1.1.1-dev.c75dcba",
"@geospatial-sdk/core": "^0.0.5-dev.20",
"@geospatial-sdk/geocoding": "^0.0.5-dev.20",
"@geospatial-sdk/openlayers": "^0.0.5-dev.20",
Expand Down

0 comments on commit 15f8c8e

Please sign in to comment.