Skip to content

Commit

Permalink
Prepare 0.1.1 (#125)
Browse files Browse the repository at this point in the history
* Remove Changesets predating 0.1.0

We have already agreed that we’re going to trial Changesets with changes after that initial release.

* Update all GitHub Actions actions

* Update to latest Node stable/LTS: 18.20.3, 20.13.1, 22.2.0

Note: breaks install of current version of tree-sitter. Will try to address that before running through CI

* Simplify linting of globals

This change was intended a while back, now it impacts the next commit so here it is.

* Update tree-sitter et al

Updates tree-sitter and related dependencies.

Many details brelow…

- - -

Fix: tree-sitter SyntaxNode.hasError is now a getter

- Updates the call site to access the getter
- Updates the type generation script to correct a mismatch with the dts-tree-sitter output

Note: based on reading release notes and looking at several of the related commits, it appears that there’s a concerted effort to unify the tree-sitter Node and WASM interfaces. There are other changes, but they don’t appear to affect us. The upshot is that if we do keep using tree-sitter, it seems likely that we’d need less effort to use the Node build on Node, rather than WASM everywhere. This would be a potential performance boost for server workloads, insofar as we may have those in the future.

- - -

Address several issues with additional build detritus produced by the newer versions:

- A .gitattributes file is now generated by tree-sitter. Its contents make sense, but it’s created in the wrong directory, with the wrong relative paths. The file is moved to the monorepo root, and its paths updated to reflect that.

- A .gitignore file is now generated by tree-sitter. Its contents more or less make sense, but again it’s created in the wrong directory, with the wrong relative paths. Those contents are now placed alongside the existing tree-sitter specific gitignore rules, with notes to guide a future updating process. (More on that below.)

- The `clean` script to prepare for build is now scripts/build/pre.mjs. It still cleans the same previous-build artifacts that it did before. It now also produces a backup of the current state of the package’s package.json. This is because tree-sitter now makes several changes to that file which do not seem appropriate to make in existing projects. It seems the intent was to make those changes **in the grammars managed by tree-sitter directly**. It seems likely these changes will be addressed in a future release. For now, we back up the file as a copy, so that…

- In a newly added post.mjs script…

  - …the contents of package.json are restored to their pre-build state. I also considered scripting git for this, but this seems like a reasonable stopgap solution as it will preserve any uncommitted local changes when the build is complete.

  - … removes the aforementioned package-local .gitattributes and .gitignore files, as well as a .editorconfig file that is also added by `tree-sitter generate`. Again, this seems like it was intended to affect grammars managed by tree-sitter directly, and will hopefully be addressed in a future release.

- The parser-types build script is renamed to parser-types.mjs and converted to ESM, for consistency with the other scripts.

- Adds `skipLibCheck` to prevent errors in `yarn workspace @getodk/tree-sitter-xpath test:types` from library types out of our control. This should probably be in the shared config, but that feels out of scope/risky to include in a branch/commit like this.

* Update eslint and related dependencies

* Update typescript & vue-related dependencies

Updated together because `typescript` and `vue-tsc` should likely update together. This feels suuuuper awkward, but so does everything to do with Vue parsing.

* Update all remaining top-level dependencies…

… and the same dependencies, where specified in-package.

* Update Vite/Vitest & related

- Note: the GitHub Actions reporter is now built in
- Remove `solidVitestNoNodeLoader` plugin. This was expected to be temporary, and is no longer necessary.
- Type fix: include Vite environment types in build.
- Type fix: ui-solid no longer uses `import.meta.resolve` in demo fixtures list component. Unclear why the type isn’t available in build, but `URL` APIs are a reasonable substitute for now.
- Type fix: Inlines the PostCSS plugin unwrapping `@layer` rules produced by PrimeVue. Also gives it a more sensible name, and clarifies the comment describing its motivation and behavior.

* Update solid-js and related dependencies

* Update remaining dependencies (**!!**)

Note: the update to crypto-js indicates that it will be going out of maintenance. Their recommendation is to migrate to equivalent native functionality. We have certain API constraints (i.e. synchrony) which currently prevent that; while theoretically possible, it would likely require serious re-engineering and potentially limit deployment scenarios (i.e. the same limitations that affect [Partytown](https://partytown.builder.io/how-does-partytown-work)). A separate issue should be filed to track this.

* Changeset for deps update

* Move all `web-forms` dependencies to dev/peer

- Vue is currently excluded from the bundle, and must be included in downstream host applications
- All others are bundled

* Load web-forms demo/build styles directly

This is mostly a stopgap! It ensures styles are loaded with the bundled build product (and has been verified working with the same approach in the demo). We’ll almost certainly need different approaches for:

- Component/scoped styles
- Custom Element build

* Remove vue-router

It wasn’t added, just moved to dev and wouldn’t affect anyone downstream (whereas it would have before). But since we’re still doing chores, why not?

* Downgrade Vue to 3.3.4 to match central-frontend

Note that Central’s dependency was last updated 10 months ago. We should upgrade again as soon as Central permits.

* Address `yarn audit`

* Version: 0.1.1

All changes generated by command `yarn changeset version`
  • Loading branch information
eyelidlessness authored May 28, 2024
1 parent f3046fe commit 6bf47de
Show file tree
Hide file tree
Showing 46 changed files with 2,006 additions and 1,604 deletions.
5 changes: 0 additions & 5 deletions .changeset/afraid-comics-pump.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/blue-papayas-know.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silver-lemons-mate.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thirty-mails-punch.md

This file was deleted.

11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* text eol=lf

packages/tree-sitter-xpath/src/*.json linguist-generated
packages/tree-sitter-xpath/src/parser.c linguist-generated
packages/tree-sitter-xpath/src/tree_sitter/* linguist-generated

packages/tree-sitter-xpath/bindings/** linguist-generated
packages/tree-sitter-xpath/binding.gyp linguist-generated
packages/tree-sitter-xpath/setup.py linguist-generated
packages/tree-sitter-xpath/Makefile linguist-generated
packages/tree-sitter-xpath/Package.swift linguist-generated
Loading

0 comments on commit 6bf47de

Please sign in to comment.