Skip to content

Commit

Permalink
Merge pull request #116 from getodk/chore/npm-scope-getodk
Browse files Browse the repository at this point in the history
Prepare to publish 0.1.0!
  • Loading branch information
eyelidlessness authored May 22, 2024
2 parents 512f823 + 43c46ff commit f3046fe
Show file tree
Hide file tree
Showing 188 changed files with 405 additions and 402 deletions.
2 changes: 1 addition & 1 deletion .changeset/afraid-comics-pump.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@odk-web-forms/xpath': patch
'@getodk/xpath': patch
---

Initial evaluator implementation
2 changes: 1 addition & 1 deletion .changeset/blue-papayas-know.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@odk-web-forms/xforms-engine': patch
'@getodk/xforms-engine': patch
'odk-scripts': patch
---

Expand Down
2 changes: 1 addition & 1 deletion .changeset/silver-lemons-mate.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@odk-web-forms/tree-sitter-xpath': patch
'@getodk/tree-sitter-xpath': patch
---

Initial implementation of XPath grammar for tree-sitter
2 changes: 1 addition & 1 deletion .changeset/thirty-mails-punch.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@odk-web-forms/tree-sitter-xpath: patch
'@getodk/tree-sitter-xpath: patch
---
Fix inclusion of types in package
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
Thank you for taking the time to report an ODK Web Forms issue!
Expand All @@ -10,7 +10,7 @@ Feature suggestions should be described [in the forum Features category](https:/
-->

#### Web Forms version and package (e.g. are you using `ui-vue` or only the engine?)
#### Web Forms version and package (e.g. are you using `web-forms` or only the engine?)

#### Browser and version

Expand All @@ -22,6 +22,6 @@ Feature suggestions should be described [in the forum Features category](https:/

#### Expected behavior

#### Other information
#### Other information

Things you tried, stack traces, related issues, suggestions on how to fix it...
74 changes: 37 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}

- uses: 'actions/cache@v3'
id: cache-build
Expand All @@ -65,7 +65,7 @@ jobs:
packages/tree-sitter-xpath/types
key: build-${{ matrix.node-version }}-${{ github.sha }}

# `@odk-web-forms/xpath` tests (currently) expect this time zone
# `@getodk/xpath` tests (currently) expect this time zone
- uses: szenius/[email protected]
with:
timezoneLinux: ${{ env.TZ }}
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -119,7 +119,7 @@ jobs:
- run: 'yarn lint'

odk-common:
name: '@odk-web-forms/common'
name: '@getodk/common'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -171,19 +171,19 @@ jobs:
fail-on-cache-miss: true

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/common test:types'
run: 'yarn workspace @getodk/common test:types'

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/common test-node:jsdom'
run: 'yarn workspace @getodk/common test-node:jsdom'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn playwright install ${{ matrix.browser }} --with-deps'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @odk-web-forms/common test-browser:${{ matrix.browser }}'
run: 'yarn workspace @getodk/common test-browser:${{ matrix.browser }}'

xforms-engine:
name: '@odk-web-forms/xforms-engine'
name: '@getodk/xforms-engine'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -235,19 +235,19 @@ jobs:
fail-on-cache-miss: true

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/xforms-engine test:types'
run: 'yarn workspace @getodk/xforms-engine test:types'

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/xforms-engine test-node:jsdom'
run: 'yarn workspace @getodk/xforms-engine test-node:jsdom'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn playwright install ${{ matrix.browser }} --with-deps'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @odk-web-forms/xforms-engine test-browser:${{ matrix.browser }}'
run: 'yarn workspace @getodk/xforms-engine test-browser:${{ matrix.browser }}'

scenario:
name: 'scenario'
name: '@getodk/scenario'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand Down Expand Up @@ -280,7 +280,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -299,19 +299,19 @@ jobs:
fail-on-cache-miss: true

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/scenario test:types'
run: 'yarn workspace @getodk/scenario test:types'

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/scenario test-node:jsdom'
run: 'yarn workspace @getodk/scenario test-node:jsdom'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn playwright install ${{ matrix.browser }} --with-deps'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @odk-web-forms/scenario test-browser:${{ matrix.browser }}'
run: 'yarn workspace @getodk/scenario test-browser:${{ matrix.browser }}'

xpath:
name: '@odk-web-forms/xpath'
name: '@getodk/xpath'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -369,19 +369,19 @@ jobs:
timezoneWindows: ${{ env.TZ }}

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/xpath test:types'
run: 'yarn workspace @getodk/xpath test:types'

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/xpath test-node:jsdom'
run: 'yarn workspace @getodk/xpath test-node:jsdom'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn playwright install ${{ matrix.browser }} --with-deps'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @odk-web-forms/xpath test-browser:${{ matrix.browser }}'
run: 'yarn workspace @getodk/xpath test-browser:${{ matrix.browser }}'

tree-sitter-xpath:
name: '@odk-web-forms/tree-sitter-xpath'
name: '@getodk/tree-sitter-xpath'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand All @@ -403,7 +403,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -421,10 +421,10 @@ jobs:
key: build-${{ matrix.node-version }}-${{ github.sha }}
fail-on-cache-miss: true

- run: 'yarn workspace @odk-web-forms/tree-sitter-xpath test'
- run: 'yarn workspace @getodk/tree-sitter-xpath test'

ui-solid:
name: 'ui-solid'
name: '@getodk/ui-solid'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand Down Expand Up @@ -457,7 +457,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -476,19 +476,19 @@ jobs:
fail-on-cache-miss: true

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/ui-solid test:types'
run: 'yarn workspace @getodk/ui-solid test:types'

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/ui-solid test-node:jsdom'
run: 'yarn workspace @getodk/ui-solid test-node:jsdom'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn playwright install ${{ matrix.browser }} --with-deps'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @odk-web-forms/ui-solid test-browser:${{ matrix.browser }}'
run: 'yarn workspace @getodk/ui-solid test-browser:${{ matrix.browser }}'

ui-vue:
name: 'ui-vue'
web-forms:
name: '@getodk/web-forms'
needs: ['install-and-build']
runs-on: 'ubuntu-latest'

Expand Down Expand Up @@ -521,7 +521,7 @@ jobs:
path: |
node_modules
**/node_modules
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', 'examples/*/yarn.lock', 'packages/*/yarn.lock') }}
key: install-${{ matrix.node-version }}-${{ hashFiles('yarn.lock', '.github/workflows/ci.yml', 'examples/*/yarn.lock', 'packages/*/package.json', 'packages/*/yarn.lock') }}
fail-on-cache-miss: true

- uses: 'actions/cache@v3'
Expand All @@ -540,13 +540,13 @@ jobs:
fail-on-cache-miss: true

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/ui-vue test:types'
run: 'yarn workspace @getodk/web-forms test:types'

- if: ${{ matrix.target == 'Node' }}
run: 'yarn workspace @odk-web-forms/ui-vue test-node:jsdom'
run: 'yarn workspace @getodk/web-forms test-node:jsdom'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn playwright install ${{ matrix.browser }} --with-deps'

- if: ${{ matrix.target == 'Web' }}
run: 'yarn workspace @odk-web-forms/ui-vue test-browser:${{ matrix.browser }}'
run: 'yarn workspace @getodk/web-forms test-browser:${{ matrix.browser }}'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ packages/**/dist
# Generated documentation
packages/*/api-docs

## Specific to tree-sitter and/or @odk-web-forms/tree-sitter-xpath
## Specific to tree-sitter and/or @getodk/tree-sitter-xpath
packages/tree-sitter-xpath/bindings/
packages/tree-sitter-xpath/build/
packages/tree-sitter-xpath/src/tree_sitter
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
# ODK Web Forms

With ODK Web Forms, you can define forms with powerful logic using the spreadsheet-based [XLSForm standard](https://docs.getodk.org/xlsform/). Use [our Vue-based frontend](/packages/ui-vue/) or build your own user experience around [the engine](/packages/xforms-engine/)!
With ODK Web Forms, you can define forms with powerful logic using the spreadsheet-based [XLSForm standard](https://docs.getodk.org/xlsform/). Use [our Vue-based frontend](/packages/web-forms/) or build your own user experience around [the engine](/packages/xforms-engine/)!

> [!IMPORTANT]
> ODK Web Forms is currently pre-release. We don't yet guarantee that its interfaces are stable and it is missing many features that are available in XLSForm form definitions.



https://github.com/getodk/web-forms/assets/447837/9b25e1bc-d209-462c-8e9e-3259bd8c5aa6



## Packages

> [!NOTE]
> Comprehensive usage and development instructions are coming soon! For now, you can see each package's README. Please be sure to run `yarn` commands from the project root.
- [ui-vue](/packages/ui-vue): form-filling frontend built with Vue
- [web-forms](/packages/web-forms): form-filling frontend built with Vue
- [xforms-engine](/packages/xforms-engine): implementation of the [ODK XForms specification](https://getodk.github.io/xforms-spec/)
- [xpath](/packages/xpath): XPath evaluator with ODK XForms extensions
- [scenario](/packages/scenario): engine client used to express tests on forms
Expand Down
13 changes: 7 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const vueGlob = (pathSansExtensions) => {
return extensionsGlob(pathSansExtensions, vueFileExtensions);
};

const vuePackageGlob = vueGlob('packages/ui-vue/**/*');
const vuePackageGlob = vueGlob('packages/web-forms/**/*');

/**
* @typedef {import('eslint').Linter.FlatConfig} FlatConfig
Expand All @@ -95,6 +95,7 @@ export default tseslint.config(
'packages/tree-sitter-xpath/grammar.js',
'packages/tree-sitter-xpath/bindings/**/*',
'packages/tree-sitter-xpath/types/**/*',
'packages/xforms-engine/api-docs/**/*',
'**/vendor',
],
},
Expand Down Expand Up @@ -124,7 +125,7 @@ export default tseslint.config(

/**
* For future reference, there's a **lot** going on here. As briefly as
* reasonably possible, all of this happens for the `ui-vue` package:
* reasonably possible, all of this happens for the `web-forms` package:
*
* 1. ESLint uses the Vue parser (`vue-eslint-parser`)
* 2. The Vue parser, in turn, uses the TypeScript parser
Expand Down Expand Up @@ -267,10 +268,10 @@ export default tseslint.config(
// Vue's project template does a great job of illustrating the use,
// and I suspect we'd benefit from applying the pattern throughout the
// entire monorepo.
'./packages/ui-vue/tsconfig.json',
'./packages/ui-vue/tsconfig.app.json',
'./packages/ui-vue/tsconfig.node.json',
'./packages/ui-vue/tsconfig.vitest.json',
'./packages/web-forms/tsconfig.json',
'./packages/web-forms/tsconfig.app.json',
'./packages/web-forms/tsconfig.node.json',
'./packages/web-forms/tsconfig.vitest.json',

'./scripts/tsconfig.json',
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/getodk/web-forms"
},
"type": "module",
"version": "0.0.0",
"version": "0.1.0",
"engines": {
"node": "^18.19.1 || ^20.11.1",
"yarn": "1.22.19"
Expand Down
Loading

0 comments on commit f3046fe

Please sign in to comment.