Skip to content

Commit

Permalink
Fix packaging (#161)
Browse files Browse the repository at this point in the history
* Fix packaging

- remove type: module from package.json
- compile robust-predicates right into the CJS file

* Update changelog

* Get tests passing

* Getting the benchmark script working
  • Loading branch information
mfogel authored Dec 17, 2023
1 parent 8559535 commit ffa5bae
Show file tree
Hide file tree
Showing 9 changed files with 366 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).

## main (unreleased)

- IN PROGRESS: fix the packaging issues with v0.15.4
- fix the packaging issues with v0.15.4

## v0.15.5 (2023-12-16)

Expand Down
10 changes: 5 additions & 5 deletions bench/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { default as load } from "load-json-file"
import { default as Benchmark } from "benchmark"
import { default as jstsUnion } from "@turf/union"
import { default as w8r } from "martinez-polygon-clipping"
import { default as mfogel } from "../dist/polygon-clipping.esm.js"
import { default as mfogel } from "polygon-clipping"

/**
* Benchmark results ( c9b02e5 )
Expand Down Expand Up @@ -43,7 +43,7 @@ const options = {
},
}

const holeHole = load.sync("./bench/fixtures/hole_hole.geojson")
const holeHole = load.sync("./fixtures/hole_hole.geojson")
new Benchmark.Suite("Hole_Hole", options)
.add("mfogel", () => {
mfogel.union(
Expand All @@ -62,8 +62,8 @@ new Benchmark.Suite("Hole_Hole", options)
})
.run()

const asia = load.sync("./bench/fixtures/asia.geojson")
const unionPoly = load.sync("./bench/fixtures/asia_unionPoly.geojson")
const asia = load.sync("./fixtures/asia.geojson")
const unionPoly = load.sync("./fixtures/asia_unionPoly.geojson")
new Benchmark.Suite("Asia union", options)
.add("mfogel", () => {
mfogel.union(
Expand All @@ -80,7 +80,7 @@ new Benchmark.Suite("Asia union", options)
.add("JSTS", () => jstsUnion(asia.features[0], unionPoly))
.run()

const states = load.sync("./bench/fixtures/states_source.geojson")
const states = load.sync("./fixtures/states_source.geojson")
new Benchmark.Suite("States clip", options)
.add("mfogel", () => {
mfogel.union(
Expand Down
53 changes: 53 additions & 0 deletions bench/package-lock.json

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

6 changes: 6 additions & 0 deletions bench/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "module",
"dependencies": {
"polygon-clipping": "file:.."
}
}
Loading

0 comments on commit ffa5bae

Please sign in to comment.