Merge pull request #1786 from umap-project/no-mjs

fix: no .mjs extension for JS modules
This commit is contained in:
David Larlet 2024-05-01 13:33:50 -04:00 committed by GitHub
commit 05213f1158
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,7 @@ mkdir -p umap/static/umap/vendors/georsstogeojson/ && cp -r node_modules/georsst
mkdir -p umap/static/umap/vendors/togpx/ && cp -r node_modules/togpx/togpx.js umap/static/umap/vendors/togpx/ mkdir -p umap/static/umap/vendors/togpx/ && cp -r node_modules/togpx/togpx.js umap/static/umap/vendors/togpx/
mkdir -p umap/static/umap/vendors/tokml && cp -r node_modules/tokml/tokml.js umap/static/umap/vendors/tokml mkdir -p umap/static/umap/vendors/tokml && cp -r node_modules/tokml/tokml.js umap/static/umap/vendors/tokml
mkdir -p umap/static/umap/vendors/locatecontrol/ && cp -r node_modules/leaflet.locatecontrol/dist/L.Control.Locate.min.* umap/static/umap/vendors/locatecontrol/ mkdir -p umap/static/umap/vendors/locatecontrol/ && cp -r node_modules/leaflet.locatecontrol/dist/L.Control.Locate.min.* umap/static/umap/vendors/locatecontrol/
mkdir -p umap/static/umap/vendors/dompurify/ && cp -r node_modules/dompurify/dist/*.mjs umap/static/umap/vendors/dompurify/ mkdir -p umap/static/umap/vendors/dompurify/ && cp -r node_modules/dompurify/dist/purify.es.mjs umap/static/umap/vendors/dompurify/purify.es.js
mkdir -p umap/static/umap/vendors/colorbrewer/ && cp node_modules/colorbrewer/index.js umap/static/umap/vendors/colorbrewer/colorbrewer.js mkdir -p umap/static/umap/vendors/colorbrewer/ && cp node_modules/colorbrewer/index.js umap/static/umap/vendors/colorbrewer/colorbrewer.js
mkdir -p umap/static/umap/vendors/simple-statistics/ && cp node_modules/simple-statistics/dist/simple-statistics.min.* umap/static/umap/vendors/simple-statistics/ mkdir -p umap/static/umap/vendors/simple-statistics/ && cp node_modules/simple-statistics/dist/simple-statistics.min.* umap/static/umap/vendors/simple-statistics/
mkdir -p umap/static/umap/vendors/iconlayers/ && cp node_modules/leaflet-iconlayers/dist/* umap/static/umap/vendors/iconlayers/ mkdir -p umap/static/umap/vendors/iconlayers/ && cp node_modules/leaflet-iconlayers/dist/* umap/static/umap/vendors/iconlayers/

View file

@ -1,4 +1,4 @@
import {default as DOMPurifyInitializer} from '../../vendors/dompurify/purify.es.mjs' import { default as DOMPurifyInitializer } from '../../vendors/dompurify/purify.es.js'
import { JSDOM } from 'jsdom' import { JSDOM } from 'jsdom'
console.log(DOMPurifyInitializer) console.log(DOMPurifyInitializer)

View file

@ -1,4 +1,4 @@
import { default as DOMPurifyInitializer } from '../../vendors/dompurify/purify.es.mjs' import { default as DOMPurifyInitializer } from '../../vendors/dompurify/purify.es.js'
/** /**
* Generate a pseudo-unique identifier (5 chars long, mixed-case alphanumeric) * Generate a pseudo-unique identifier (5 chars long, mixed-case alphanumeric)
@ -358,7 +358,7 @@ export function template(str, data) {
} }
export function parseNaiveDate(value) { export function parseNaiveDate(value) {
const naive = new Date(value) const naive = new Date(value)
// Let's pretend naive date are UTC, and remove time… // Let's pretend naive date are UTC, and remove time…
return new Date(Date.UTC(naive.getFullYear(), naive.getMonth(), naive.getDate())) return new Date(Date.UTC(naive.getFullYear(), naive.getMonth(), naive.getDate()))
} }