Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
fc4db14
feat(mf2): In Pattern, replace Text with a primitive string
eemeli Dec 22, 2023
a19397b
fix(mf2): Rename Reserved -> UnsupportedAnnotation
eemeli Dec 23, 2023
8aef253
fix(mf2): Rename FunctionRef -> FunctionAnnotation
eemeli Dec 24, 2023
0444f0a
fix(mf2): Rename pattern/ -> expression/
eemeli Dec 24, 2023
c98b911
feat(mf2): Refactor Expression to have arg+annotation rather than body
eemeli Dec 26, 2023
ac2cc2f
feat(mf2): Update syntax to .let & .match, with {{doubled pattern bra…
eemeli Dec 28, 2023
ad608e1
feat(mf2): Replace .let with .input and .local
eemeli Dec 28, 2023
c0dda51
feat(mf2): Add ReservedStatement
eemeli Dec 28, 2023
1d9e73f
fix(mf2): Refactor CST Expression structure
eemeli Dec 28, 2023
c4e8261
feat(mf2): Support {#markup}, {/markup}, and {#markup /}
eemeli Jan 1, 2024
7ae0e10
feat(mf2): Allow number-literal as unquoted value
eemeli Jan 1, 2024
c9e081f
feat(mf2): Add CST Identifier, with ns:name support
eemeli Jan 1, 2024
e22e4b7
fix(mf2): Simplify formatting Context, dropping resolveExpression & r…
eemeli Jan 1, 2024
d821d05
fix(mf2): Treat duplicate option identifiers as a data model error
eemeli Jan 1, 2024
ae72b4c
style: Add ESLint rules curly, no-useless-rename & sort-imports
eemeli Jan 2, 2024
289d640
style: Apply updated ESLint rules
eemeli Jan 2, 2024
710e63d
chore: Drop husky & commitlint -- more trouble than they're worth
eemeli Jan 3, 2024
78cb096
refactor(mf2): Collect files in a new src/data-model/ directory
eemeli Jan 2, 2024
487744f
refactor(mf2): Collect all type guards into src/data-model/type-guard…
eemeli Jan 2, 2024
c69b00e
refactor(mf2): Collect all data model types into src/data-model/types.ts
eemeli Jan 2, 2024
af3c1bb
feat(mf2): Require annotations on all selectors
eemeli Jan 2, 2024
9780f6f
refactor(mf2): Rename src/data-model/ files, drop getMessageValue export
eemeli Jan 2, 2024
34b0198
test(mf2): Split test data into three files; leave out coverage from …
eemeli Jan 2, 2024
00d742b
feat(mf2): Add :integer, :ordinal and :plural aliases
eemeli Jan 2, 2024
3de3609
feat(mf2): Add a data model validator & visitor
eemeli Jan 2, 2024
6d31d55
feat(mf2-fluent): Add default-true detectNumberSelection option
eemeli Jan 2, 2024
ddc286d
refactor(mf2): Rename src/runtime/ as src/functions/, add src/formatt…
eemeli Jan 2, 2024
7e195c8
refactor(mf2): Rearrange exports, adding messageformat/functions & me…
eemeli Jan 2, 2024
40fb606
chore(mf2): Use NodeNext module & moduleResolution in tsconfigs
eemeli Jan 2, 2024
f9f9c98
style(mf2): Always use file extensions in imports
eemeli Jan 2, 2024
f7b0866
refactor(mf2-fluent)!: Change module type to ES only
eemeli Jan 3, 2024
8804022
fix(mf2): Consider U+3000 as whitespace
eemeli Jan 3, 2024
e6991fd
test(mf2): Add missing jest moduleNameMapper config for new messagefo…
eemeli Jan 3, 2024
e6566cf
feat(mf2): Improve visitor, add MessageNode type
eemeli Jan 3, 2024
28c2e99
feat(mf2): Include CST reference in parsed data model, using `cst` Sy…
eemeli Jan 3, 2024
ab0f807
fix(mf2): Use validate() for all data model error detection
eemeli Jan 3, 2024
74549bb
refactor(mf2): Move & rename parsers, now use messageFromCST(parseCST…
eemeli Jan 3, 2024
44d70da
refactor(mf2): Rename src/cst-parser/ -> src/cst/
eemeli Jan 3, 2024
825c189
fix(mf2): Include all sigils in CST
eemeli Jan 3, 2024
867c575
feat(mf2): Add CST stringifier
eemeli Jan 3, 2024
915b6ed
refactor(mf2): Move src/stringifier/message.ts -> src/data-model/stri…
eemeli Jan 3, 2024
207476f
fix(mf2): Use only 'messageformat/functions' for function type exports
eemeli Jan 3, 2024
579501e
fix(mf2): Add default onError handler (throws) for validate()
eemeli Jan 3, 2024
e277263
docs(mf2): Satisfy api-extractor
eemeli Jan 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ rules:
array-callback-return: error
camelcase: off
consistent-return: error
curly: [warn, multi-line, consistent]
eqeqeq: [error, smart]
no-constant-condition: [error, checkLoops: false]
no-implicit-globals: error
no-unused-vars: [warn, argsIgnorePattern: '^_']
no-useless-rename: error
prefer-const: [error, destructuring: all]
sort-imports: [warn, ignoreDeclarationSort: true]

overrides:
- files:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- run: npm test -- --coverage
- run: npm run build

lint:
Expand Down
10 changes: 0 additions & 10 deletions commitlint.config.js

This file was deleted.

4 changes: 0 additions & 4 deletions config/husky/commit-msg

This file was deleted.

2 changes: 2 additions & 0 deletions config/tsconfig.mf2-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"extends": "./tsconfig.base.json",
"compilerOptions": {
"lib": ["ES2020"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2020",
"types": []
}
Expand Down
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ module.exports = {
moduleFileExtensions: ['mjs', ...defaults.moduleFileExtensions],
moduleNameMapper: {
'^messageformat$': '<rootDir>/packages/mf2-messageformat/src/index.ts',
'^messageformat/functions$':
'<rootDir>/packages/mf2-messageformat/src/functions/index.ts',
'^messageformat/functions/utils$':
'<rootDir>/packages/mf2-messageformat/src/functions/utils.ts',
'^@messageformat/core$': '<rootDir>/packages/core/src/messageformat.ts',
'^@messageformat/core/compile-module$':
'<rootDir>/packages/core/src/compile-module.ts',
Expand Down
Loading