8000 Make jetdb-wasm a package npm can show: its README and the JavaScript API by dominion525 · Pull Request #118 · dominion525/jetdb · GitHub
[go: up one dir, main page]

Skip to content

Make jetdb-wasm a package npm can show: its README and the JavaScript API - #118

Merged
dominion525 merged 19 commits into
mainfrom
feature/wasm-npm-package
Oct 22, 2026
Merged

dominion525 merged 19 commits into
mainfrom
feature/wasm-npm-package

Conversation

@dominion525
@dominion525 dominion525 commented Oct 22, 2026 •
Copy link
Copy Markdown
Owner

Summary

  • Write the README of jetdb-wasm that npm shows on the page of the package: what it reads, how to install it, how to use it in a browser and in Node.js, how values and errors come, and its limitations. build-wasm-package.sh copies it into the package, and test-wasm-package.sh checks that the package npm installs has it, and says so when it does not
  • Add homepage and bugs to package.json, for the links of the npm page
  • Document the JavaScript API in docs/wasm.md and docs/wasm.ja.md: which build the exports choose and when to call init(), opening and freeing a database, each method of Database and its options, the values by Access type, the errors, which are an Error named JetdbError told by name and code, and the limitations. The fields of each object are left to the comments of the TypeScript types in the package
  • Correct two comments of the TypeScript types in js.rs: the next of rows is a position among the pages of its table, valid only for that table, and INVALID_ARGUMENT is thrown also for an option of a value that is not valid and for a name shared by objects without the type option
  • Name the Access types as Access names them: by the lists of data types and field sizes of the table design view in Japanese, and by Microsoft's article in English
  • Point from the README of the repository to the package and docs/wasm.md, and tell in docs/ci that the package test checks the README

🤖 Generated with Claude Code

dominion525 and others added 19 commits October 22, 2026 23:53
- Tell what the package is, how to install it, how to use it in a browser and in Node.js, what it reads with which methods, how values and errors come, and its limitations
- Point to docs/wasm.md for each method and its options

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s page

- build-wasm-package.sh copies README.md into the package with the licenses
- test-wasm-package.sh checks that the package npm installs has README.md
- Add homepage, the README of jetdb-wasm, and bugs, the issues on GitHub, to package.json

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Write docs/wasm.md: how to load the module, open a database and free it, the methods and options for tables, relationships and DDL, queries, VBA, forms and reports, macros, and object properties, the values, the kinds of errors, and the limitations
- Leave the fields of each object to the comments of the TypeScript types in the package

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Write docs/wasm.ja.md in the same sections as docs/wasm.md: loading the module, opening and freeing a database, each method and its options, the values, the kinds of errors, and the limitations
- Name the Access types Large Number and Attachment as Microsoft's Japanese article does

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…orts and VBA of Access 97

- Add to the limitations that jetdb does not read the forms, reports and VBA of an Access 97 (Jet3) file, as docs/wasm.md tells

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Use Yes/No型, 拡張した日付/時刻 and レプリケーション ID型 (GUID) in the Japanese version, as the lists of data types and field sizes in the table design view of Access name them
- Use Short Text, Long Text and Replication ID (GUID) in the English version, as Microsoft's English article names them

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- A bundler that builds for the server, such as for server-side rendering, gets the CommonJS build through the node condition of the exports, and that build has no default export to call as init
- Tell in docs/wasm.md, wasm.ja.md and the README which condition chooses which build, and that init() is called only with the ES module

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ID_ARGUMENT without type

- properties, when objects of different types share the name, and formControls, formProperties, formStream and embeddedMacros, when a form and a report share it, throw INVALID_ARGUMENT without the type option, while the documentation told only of an argument of the wrong kind
- Tell it in the table of errors and with the type options (en/ja)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t API

- Add, as the TypeScript types tell, that a named macro whose grid of actions could not be read and an embedded macro stored without XML have no text either, besides a data macro (en/ja)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…of jetdb-wasm

- Tell that a Date/Time Extended value that cannot be read as a date and time comes as a Uint8Array of its bytes, a type jetdb does not know as a Uint8Array, and a complex column of a kind jetdb does not know as a number, the ID of its values in a hidden table (en/ja)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… import

- JetdbError is only a TypeScript type, and the package exports no class of the name, so importing it to tell errors by instanceof fails, on import or at the check
- Tell in the README, docs/wasm.md and wasm.ja.md that the methods throw an Error whose name is JetdbError, to be told by name and code, as the example now does

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Add the check of the README in test-wasm-package.sh to the description of the package test in docs/ci.md and ci.ja.md

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- The check of the README in test-wasm-package.sh stopped without a word under set -e; it now says that the package has no README.md before it stops

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ipt API

- The README of the repository leads to the documentation of the CLI and the library, but only the README for npm linked to docs/wasm.md
- Add to the features that the jetdb-wasm package in crates/jetdb-wasm reads databases in the browser and Node.js, with a link to docs/wasm.md (docs/wasm.ja.md in Japanese); it is not on npm yet, so no installation is told

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- next is a position among the data pages of the table, and points to another row in another table of the same file, while the TypeScript types and the documentation called it a position in the file, valid for the same file
- Call it a position among the pages of the table, valid only for the same table of the same file, in the comment of the types (js.rs), docs/wasm.md and wasm.ja.md

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ation

- INVALID_ARGUMENT is thrown also for a value of the right type that is not valid, such as a limit that is not a positive integer, a delimiter that is not one character, a bin outside its list, or a start that is not an earlier next; the documentation told only of an argument of the wrong kind and of a shared name, and the comment of the types only of the former
- Tell both an argument or option that is not valid and a name shared by objects without the type option, in the comment of the types (js.rs), docs/wasm.md and wasm.ja.md

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Tell that using works only where JavaScript supports it, as the generated code defines Symbol.dispose only where it exists
- Say in the Japanese version, as the English one does, that every property has its number as id
- Tell that the xml of a data macro is the whole XML document it was stored in, which may hold other data macros of the table
- Add to the table of values that Date/Time is rounded to the second and that multiple values give an empty array when there are none (en/ja)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… it is chosen

- The example read the file of the input as the page loaded, so copied as it was, it failed on a file not chosen yet
- Open the chosen file on the change event of the input

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Reword the values that come as strings in the README, and in the English version the sentence on server-side rendering, the limit option, the names of properties, and the cases in which text is null
- Call it サーバーサイドレンダリング (SSR) and 取得 in the Japanese version, and reword the queries and the names of the columns
- Add, as the comment of the types does, that Math.fround(value) gives the stored value of a Single (en/ja)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dominion525
dominion525 merged commit f6ae2b2 into main Oct 22, 2026
10 checks passed
@dominion525
dominion525 deleted the feature/wasm-npm-package branch October 22, 2026 18:07
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.

1 participant

0