Commit graph

334 commits

Author SHA1 Message Date
Joshua Horton
6263648e8e maint: fix npm audit issues
```
# npm audit report

brace-expansion  1.0.0 - 1.1.11 || 2.0.0 - 2.0.1
brace-expansion Regular Expression Denial of Service vulnerability - https://github.com/advisories/GHSA-v6h2-p8h4-qcjw
brace-expansion Regular Expression Denial of Service vulnerability - https://github.com/advisories/GHSA-v6h2-p8h4-qcjw
fix available via `npm audit fix`
node_modules/brace-expansion
node_modules/mocha/node_modules/brace-expansion

form-data  4.0.0 - 4.0.3
Severity: critical
form-data uses unsafe random function in form-data for choosing boundary - https://github.com/advisories/GHSA-fjxv-7rqg-78g4
fix available via `npm audit fix`
node_modules/form-data

2 vulnerabilities (1 low, 1 critical)
```
2025-08-08 09:04:02 -05:00
dependabot[bot]
1525cd3058
build(deps): bump multer from 2.0.1 to 2.0.2
Bumps [multer](https://github.com/expressjs/multer) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-18 02:03:46 +00:00
dependabot[bot]
70859f2d34
chore(deps): bump multer from 2.0.0 to 2.0.1
Bumps [multer](https://github.com/expressjs/multer) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-05 05:08:54 +00:00
dependabot[bot]
edfa7ed2f9
chore(deps-dev): bump tar-fs from 3.0.8 to 3.0.9
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 3.0.8 to 3.0.9.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.8...v3.0.9)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 07:03:57 +00:00
Joshua Horton
bfb97ca0c6 maint(web): upgrade Sentry to 8.55.0
Fixes: KEYMAN-WEB-RX
(It was produced artificially after this PR's changes to validate them.)

Cross-reference with https://github.com/getsentry/sentry-javascript/blob/master/docs/migration/v7-to-v8.md in regard to minimum supported versions.

@keymanapp-test-bot skip
2025-05-22 14:02:16 +07:00
Marc Durdin
2d7484c84a maint(developer): update multer to v2.0.0
Looks like dependabot did not cleanly upgrade multer (#13982). Possibly
a bug with workspaces? Removed from package.json, npm install, re-added,
npm install to fix the issue.

See-also: #13982
2025-05-21 10:58:29 +02:00
dependabot[bot]
87a9935c28
chore(deps): bump multer from 1.4.5-lts.1 to 2.0.0
Bumps [multer](https://github.com/expressjs/multer) from 1.4.5-lts.1 to 2.0.0.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/v2.0.0/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v1.4.5-lts.1...v2.0.0)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-20 01:45:05 +00:00
Joshua Horton
8991df3865 maint: update fast-json-parser
The `fast-json-parser` package is needed by `ajv-cli`, which is used during common/web/types/build.sh configure.

Test-bot: skip
2025-05-13 14:46:32 +07:00
Joshua Horton
08ba7c4208 maint: update @actions/github + @octokit references 2025-05-13 14:25:46 +07:00
Joshua Horton
155c1a2b12 maint: update mocha
Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy.  As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.

Test-bot: skip
2025-05-13 14:02:02 +07:00
Joshua Horton
90047e8c6a maint: evaluate and apply npm audit fix (unforced) 2025-05-13 13:23:03 +07:00
Steven R. Loomis
307288dc3b chore(developer): deps: fast-xml-parser@5.2.2
My line number changes were merged into the main branch

Fixes: #10622
2025-05-08 17:43:19 -05:00
Steven R. Loomis
0edbbec981 Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-04-26 14:41:54 -05:00
Steven R. Loomis
64bcfc66e9 Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-04-10 17:02:05 -05:00
dependabot[bot]
9e35cb1f45
build(deps): bump koa from 2.15.3 to 2.16.1
Bumps [koa](https://github.com/koajs/koa) from 2.15.3 to 2.16.1.
- [Release notes](https://github.com/koajs/koa/releases)
- [Changelog](https://github.com/koajs/koa/blob/master/History.md)
- [Commits](https://github.com/koajs/koa/compare/2.15.3...v2.16.1)

---
updated-dependencies:
- dependency-name: koa
  dependency-version: 2.16.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-09 13:14:58 +00:00
Steven R. Loomis
1f2b8463f5 chore(developer): deps: update to fast-xml-parser@5.1.0 (Metadata branch)
Fixes: #10622
2025-04-03 12:15:20 -05:00
dependabot[bot]
91a1e823b6
build(deps): bump tar-fs and puppeteer-core
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) and [puppeteer-core](https://github.com/puppeteer/puppeteer). These dependencies needed to be updated together.

Updates `tar-fs` from 3.0.5 to 3.0.8
- [Commits](https://github.com/mafintosh/tar-fs/compare/v3.0.5...v3.0.8)

Updates `puppeteer-core` from 22.7.0 to 22.15.0
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v22.7.0...puppeteer-core-v22.15.0)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 3.0.8
  dependency-type: indirect
- dependency-name: puppeteer-core
  dependency-version: 22.15.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-03 14:46:22 +00:00
Steven R. Loomis
0c290bd37a feat(developer): update for line numbers
- update to metadata branch of fast-xml-parser
- restructure metadata handling
- use type safety for fast-xml-parser options

Fixes: #10622
2025-03-31 16:11:19 -05:00
Marc Durdin
ab59fa29b4
Merge branch 'master' into chore/b18s4-merge-beta-to-master 2025-03-29 05:41:03 +07:00
Marc Durdin
a52437c407 chore: Merge branch 'master' into chore/b18s4-merge-beta-to-master 2025-03-29 05:38:08 +07:00
Steven R. Loomis
8aa9219410 Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-03-27 16:02:45 -05:00
Marc Durdin
86102c405e
Merge pull request #13191 from keymanapp/dependabot/npm_and_yarn/esbuild-0.25.0
chore(deps-dev): bump esbuild from 0.18.20 to 0.25.0
2025-03-24 11:22:00 +07:00
Marc Durdin
7d5c98ddba fix(developer): bump fast-xml-parser to 5.0.9
This is a major dependency version bump (4.5.0 to 5.0.9) which we would
normally avoid during beta. However, we need the fix
NaturalIntelligence/fast-xml-parser#725 for hex escapes in XML, which is
incorporated in 5.0.9.

I have assessed the other changes to fast-xml-parser and found no
breaking changes for us, but I tightened the types in xml-utils
declarations and found some minor inconsistencies which appear to have
no impact, and which I have corrected:
* wrong type in unused parameter to `tagValueProcessor`
* reference to unused property `options.emptyTag`

While doing this, I consolidated the common options for the parser in
order to verify consistency, but made no changes to the resolved
parsing/building options.

Added a test to ldml keyboard reading, to verify that numeric strings
are treated as strings, given the divergence in the `numberParseOptions`
option, and it shows that numeric strings are treated as strings.

Fixes: #13348
2025-03-17 06:22:29 +07:00
Steven R. Loomis
819d9bf562 feat(developer): API for resolving line numbers for messages
- change to use a different fast-xml-parser PR, https://github.com/NaturalIntelligence/fast-xml-parser/pull/729

Fixes: #10622
2025-02-28 12:08:31 -06:00
Steven R. Loomis
ec68e74bde feat(developer): add experimental char-offset data
Depends on PR https://github.com/NaturalIntelligence/fast-xml-parser/pull/728 so uses srl repository "temporarily"

Fixes: #10622
2025-02-27 16:24:21 -06:00
Steven R. Loomis
53b20e6adc feat(developer): use peggy grammar in from/to transform
Fixes: #13175
2025-02-14 12:27:15 -06:00
Steven R. Loomis
a2a0e79675 feat(core): convert abnf to peggy grammar
- convert each .abnf to a .pegjs file

Fixes: #13175
2025-02-14 12:27:15 -06:00
dependabot[bot]
4abc1b3d2b
chore(deps-dev): bump esbuild from 0.18.20 to 0.25.0
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.18.20 to 0.25.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.20...v0.25.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 11:17:53 +00:00
Marc Durdin
b49334d9cf chore(developer): use langtags.json for kmc-generate language names
Also fills out the remaining functionality in @keymanapp/langtags.

Fixes: #13045
2025-01-27 11:47:25 +07:00
Marc Durdin
50097802ba chore: include sourcemap-path-remapper tool in package.json 2025-01-27 10:22:28 +07:00
Marc Durdin
75d77704a2 refactor: move langtags to @keymanapp/langtags npm module
We want to use langtags in several modules, so it makes sense to make it
into its own NPM module.

Relates-to: #13045
2025-01-27 09:59:38 +07:00
dependabot[bot]
b7b70a0eaf
chore(deps): bump cross-spawn from 7.0.3 to 7.0.6
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 08:51:07 +00:00
Marc Durdin
d68a64252e feat(developer): add GitHub and Cloud support to kmc-copy
This requires a significant refactor to the compiler interfaces to allow
for asynchronous filesystem and network access. For now, only kmc-copy
uses the asynchronous interfaces, but over time we may try and
consolidate them where other compiler modules find them useful. This
adds a big set of unit test fixtures to avoid network instability in
tests (the fixtures can be regenerated by setting environment variable
`TEST_SAVE_FIXTURES`).
2024-10-28 10:33:42 +07:00
Marc Durdin
7d17913e18 feat(developer): seed kmc-copy 2024-10-22 10:28:00 +07:00
Marc Durdin
0d9688451d
Merge branch 'master' into feat/developer/kmc-generate 2024-10-11 03:26:54 +02:00
Marc Durdin
76ebb5b02b
Merge branch 'master' into feat/common/12347-check-markdown-links 2024-10-09 05:16:31 +02:00
Marc Durdin
2e059e9730
Merge branch 'master' into feat/common/12347-check-markdown-links 2024-10-07 09:41:45 +02:00
Steven R. Loomis
3e168aafb2 chore(developer,common): deps: xml2js / fast-xml-parser
- remove vendored xml2js
- add fast-xml-parser@4.5.0
- Rewire the KeymanXMLReader / KeymanXMLWriter to use fast-xml-parser

Four small changes to the test data on the generated .kvks:
- allow &quot; for XML generation (" is legal)
- use the same XML prologue as the actual .kvks files.
- treat <key></key> as <key/> since we can't distinguish
  (removed a "_": "" entry)
- remove whitespace because we now can ("_": "\n  \n \n") on non-leaf nodes.
  This is ignored by the kvks code, but was difficult to maintain roundtrip.

Fixes: #12208
2024-10-03 08:34:24 -05:00
Marc Durdin
10e4bba100
Merge branch 'master' into feat/developer/kmc-generate 2024-09-26 18:55:20 +02:00
Marc Durdin
640d3e5096 test(developer): add markdown link check test for product documentation
Adds check-markdown package that parses .md files, looks for links and
images, and verifies that they are valid links (for internal links).
2024-09-25 15:51:32 -07:00
dependabot[bot]
e35bb72a44
chore(deps-dev): bump rollup from 4.16.4 to 4.22.4
Bumps [rollup](https://github.com/rollup/rollup) from 4.16.4 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.16.4...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-24 00:37:34 +00:00
Marc Durdin
6b83589987
Merge pull request #12402 from keymanapp/fix/developer/12395-rewrite-ldml-visual-keyboard-compiler
fix(developer): rewrite ldml visual keyboard compiler
2024-09-17 00:40:15 +02:00
Marc Durdin
bf25a6ee56
Merge pull request #12396 from keymanapp/dependabot/npm_and_yarn/express-4.20.0
chore(deps): bump express from 4.19.2 to 4.20.0
2024-09-14 03:39:35 +02:00
Eberhard Beilharz
fc32f02dc9
Merge pull request #12400 from keymanapp/chore/web/testexplorer
chore(web): allow to run unit tests in vscode test explorer
2024-09-12 14:07:55 +07:00
Marc Durdin
8424cb9349
Merge branch 'master' into feat/developer/kmc-generate 2024-09-12 08:18:37 +02:00
Marc Durdin
e4017a8c28 fix(developer): rewrite ldml visual keyboard compiler
The visual keyboard compiler was never finished in 17.0. This rewrites
it to:

1. Use the kmxplus data rather than reading from xml directly
2. Fill in `visualkeyboard.header.kbdname`
3. Support modifiers
4. Handle encoded characters like `\u{1234}`
5. Handle string variables like `${one}`*

Additional unit tests have been added to verify the behavior of the
visual keyboard compiler in more detail.

TODO-LDML: string variables appear to have a secondary bug -- they seem
to be returning the string 'undefined'. I have disabled the related
tests and will examine this separately, and enable those tests once
fixed.

TODO-LDML: we should probably add a compiler warning + unit test for
`<layers formId="us"><layer id="base">`, because this pattern does not
make sense: when using non-touch forms, the `<layer>` element should use
`modifiers` attribute, and correspondingly, `modifiers` attribute should
_not_ be used when `formId` is `touch`.

Other fixes:

1. The LDML XML reader was relying on its input being a Node.js `Buffer`
   even though it was declared `Uint8Array`, as it implicitly used
   `Buffer.toString()` to do text conversion. (`Buffer` subclasses from
   `Uint8Array`). This breaks when using `Uint8Array` directly and means
   we had an implicit dependency on Node.js. See also #12331.
2. XML errors were not captured in the LDML XML reader. See also #12331.
3. The unused and unfinished touch-layout-compiler.ts and
   keymanweb-compiler.ts have been removed along with corresponding unit
   tests and fixtures. These are replaced by Core implementations; see
   #12291.

Fixes: #12395
2024-09-12 06:06:00 +07:00
Eberhard Beilharz
95f36acb68
chore(web): allow to run unit tests in vscode test explorer
#11746 removed the `ts-node` dependency. Unfortunately that broke running
TypeScript test files with Mocha in VSCode Test Explorer because it no
longer knows what to do with .ts files. This change adds the more modern
`tsx` package as developer dependency, which allows to use Test Explorer
again.

See https://stackoverflow.com/a/77609121.
2024-09-11 19:28:33 +02:00
Eberhard Beilharz
b20d7f1eb4
refactor(web): move sentry-manager → web/src/engine/sentry-manager
Move `common/web/sentry-manager` to `web/src/engine/sentry-manager`.

Fixes: #12387
2024-09-11 15:15:01 +02:00
dependabot[bot]
094aa985b2
chore(deps): bump express from 4.19.2 to 4.20.0
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.20.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.20.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 07:18:39 +00:00
Eberhard Beilharz
a6d2d02e61
refactor(web): move common/web/utils to web/src/engine/common/web-utils/
Fixes:#12025
2024-09-10 18:12:46 +02:00