Make aws/cloudflare depend on pmtiles from npm [#455] (#515)

* Make aws/cloudflare depend on pmtiles from npm [#455]

This is clearer to developers than relying on the local code being built.

* update check_examples.py
* bump openlayers to v2 with upgrade of pmtiles to v4 [#455]
* update to 4.2.1
This commit is contained in:
Brandon Liu
2025-01-14 17:09:11 +08:00
committed by GitHub
parent d3740449d4
commit 61e60c69d2
12 changed files with 95 additions and 33 deletions

View File

@@ -13,6 +13,17 @@ for package in glob.glob("**/package.json",recursive=True):
name = j["name"]
version = j["version"]
for dependent in glob.glob("**/package.json",recursive=True):
if "node_modules" in dependent:
continue
with open(dependent,"r") as f:
j2 = json.loads(f.read())
if 'dependencies' in j2 and name in j2["dependencies"]:
dependent_version = j2["dependencies"]["pmtiles"]
if dependent_version != "^" + version:
print(dependent,"should be ^",version,"was",dependent_version)
fail = 1
for html in glob.glob("**/*.html",recursive=True):
if "node_modules" in html:
continue