Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export all GEOS functions #9

Merged
merged 22 commits into from
Jul 26, 2023
Merged

Export all GEOS functions #9

merged 22 commits into from
Jul 26, 2023

Conversation

chrispahm
Copy link
Owner

@chrispahm chrispahm commented Jul 25, 2023

This PR is a major overhaul of the repo: It incorporates the major takeaways from the discussion in #5

  • GEOS-WASM now just contains the barebones C-API without any further abstractions
  • Includes all GEOS v3.9.4 functions
  • Has JSDoc type annotations for all functions
  • Overhauled API documentation (from JSDocs) including examples
  • 180 tests, mostly documenting how each of the functions can be called from JS

@sanak could you possibly have a look and check if this works for you?

If so, I'd merge this PR, then merge #8 and add the missing test cases. Then you can start working on Shapely.js if you'd like 😄🚀

@sanak
Copy link
Contributor

sanak commented Jul 25, 2023

@chrispahm
Wow, great!
Thanks for this update and really beautiful docs! 😄

I confirmed that most of package.json scripts (like npm run test), but I encountered the errors on the following scripts, so checking these is helpful. 🙇

  • npm run performance

    % npm run performance
    
    > [email protected] performance
    > node test/performance.mjs
    
    node:fs:600
      handleErrorFromBinding(ctx);
      ^
    
    Error: ENOENT: no such file or directory, open './data/aus.json'
        at Object.openSync (node:fs:600:3)
        at readFileSync (node:fs:468:35)
        at file:///Users/sanak/Build/wasm/geos-wasm-upstream/test/performance.mjs:8:36 {
      errno: -2,
      syscall: 'open',
      code: 'ENOENT',
      path: './data/aus.json'
    }
    
    Node.js v18.14.2
    
  • npm run docs:build

    % npm run docs:build 
    
    > [email protected] docs:build
    > vitepress build docs
    
    
      vitepress v1.0.0-beta.6
    
    ⠙ building client + server bundles...
    new URL("./",import.meta.url) doesn't exist at build time, it will remain unchanged to be resolved at runtime
    ⠏ building client + server bundles...
    
    (!) Found dead link /examples in file index.md
    
    If this is expected, you can disable this check via config. Refer: https://vitepress.dev/reference/site-config#ignoredeadlinks
    
    [vitepress] 1 dead link(s) found.
    ✖ building client + server bundles...
    build error:
    Error: 1 dead link(s) found.
        at Object.renderStart (file:///Users/sanak/Build/wasm/geos-wasm-upstream/node_modules/vitepress/dist/node/serve-98a6c925.js:37211:15)
        at file:///Users/sanak/Build/wasm/geos-wasm-upstream/node_modules/rollup/dist/es/shared/node-entry.js:25336:40
        at async Promise.all (index 0)
        at async PluginDriver.hookParallel (file:///Users/sanak/Build/wasm/geos-wasm-upstream/node_modules/rollup/dist/es/shared/node-entry.js:25264:9)
        at async Bundle.generate (file:///Users/sanak/Build/wasm/geos-wasm-upstream/node_modules/rollup/dist/es/shared/node-entry.js:17703:13)
        at async file:///Users/sanak/Build/wasm/geos-wasm-upstream/node_modules/rollup/dist/es/shared/node-entry.js:26569:27
        at async catchUnfinishedHookActions (file:///Users/sanak/Build/wasm/geos-wasm-upstream/node_modules/rollup/dist/es/shared/node-entry.js:25702:16)
    
  • npm run docs:preview

    % npm run docs:preview
    
    > [email protected] docs:preview
    > vitepress preview docs
    
    
      vitepress v1.0.0-beta.6
    
    failed to start server. error:
    Error: ENOENT: no such file or directory, open '/Users/sanak/Build/wasm/geos-wasm-upstream/docs/.vitepress/dist/404.html'
        at Object.openSync (node:fs:600:3)
        at Object.readFileSync (node:fs:468:35)
        at serve (file:///Users/sanak/Build/wasm/geos-wasm-upstream/node_modules/vitepress/dist/node/serve-98a6c925.js:63806:25)
    

Thanks!

@chrispahm
Copy link
Owner Author

Thanks for checking @sanak!
Hope the last commits fixes all of those, so will merge now!

@chrispahm chrispahm merged commit ac83d3a into main Jul 26, 2023
@chrispahm chrispahm mentioned this pull request Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants