Skip to content

Commit

Permalink
Merge pull request #20 from imrim12/1.0.0-rc.3
Browse files Browse the repository at this point in the history
release 1.0.0 rc.3
  • Loading branch information
imrim12 authored Dec 25, 2022
2 parents 2b47d1a + 5741d58 commit 1bbf25d
Show file tree
Hide file tree
Showing 48 changed files with 1,494 additions and 501 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nx-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
init-commands: |
npx nx-cloud start-ci-run --agent-count=3
parallel-commands: |
npx nx-cloud record -- npx nx affected --target=build
npx nx-cloud record -- npx nx affected --target=build:all
npx nx-cloud record -- npx nx affected --target=typecheck
npx nx-cloud record -- npx nx affected --target=test
parallel-commands-on-agents: |
npx nx affected --target=build --parallel=3
npx nx affected --target=build:all --parallel=3
npx nx affected --target=typecheck --parallel=3
npx nx affected --target=test --parallel=3
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"Parser.ts": "i18n",
"Tokenizer.ts": "i18n"
},
"material-icon-theme.folders.associations": {}
"material-icon-theme.folders.associations": {},
"editor.insertSpaces": false,
"editor.detectIndentation": false,
"editor.trimAutoWhitespace": false
}
43 changes: 32 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@


## [1.0.0-rc.2](https://github.com/formkl/formkl/compare/1.0.0-rc.1...1.0.0-rc.2) (2022-11-23)
## [1.0.0-rc.3](https://github.com/imrim12/formkl/compare/1.0.0-rc.2...1.0.0-rc.3) (2022-12-25)


### Features

* added husky git hooks ([966c15f](https://github.com/formkl/formkl/commit/966c15f7dae5aeebb7525104a135c4c9e7a4faad))
* added release-it package for release ([e46d2c0](https://github.com/formkl/formkl/commit/e46d2c06161baea229213e5bb26be6386f44bd10))
* support form lifecycle hooks ([d2aff34](https://github.com/formkl/formkl/commit/d2aff3436ad0c9e77b4d3728f0dcfe915f6be804))
* add stringifier ([8c8d13e](https://github.com/imrim12/formkl/commit/8c8d13e22c4f6cfd2707ec0423700590bc7bb62a))
* added husky git hooks ([966c15f](https://github.com/imrim12/formkl/commit/966c15f7dae5aeebb7525104a135c4c9e7a4faad))
* added release-it package for release ([e46d2c0](https://github.com/imrim12/formkl/commit/e46d2c06161baea229213e5bb26be6386f44bd10))
* handle keyword value in validation ([45972c6](https://github.com/imrim12/formkl/commit/45972c6a4116fe34881898adb1d2554f15bd9e6c))
* support form lifecycle hooks ([d2aff34](https://github.com/imrim12/formkl/commit/d2aff3436ad0c9e77b4d3728f0dcfe915f6be804))


### Bug Fixes

* always return true when use regex with logic validator ([3dd1e41](https://github.com/formkl/formkl/commit/3dd1e418f181390600c656f6956b28d1bc8f99ec))
* build fail ([51298d8](https://github.com/formkl/formkl/commit/51298d80524a2359195d3f861208c1b06e0108df))
* circular dependencies build fail nx ([d6c59a6](https://github.com/formkl/formkl/commit/d6c59a68df2c44b9f1d42018bb95ffef7b435605))
* editor web component lifecycle works differently on vue/react ([7d006b7](https://github.com/formkl/formkl/commit/7d006b776c28ef33682cd0906c241ae4e78cb5e7))
* setup vitest component testing ([8a3f07d](https://github.com/formkl/formkl/commit/8a3f07df969299dadb78e4c3b8e96b3ccbaf3dac))
* tsconfig.json ([d7657fa](https://github.com/formkl/formkl/commit/d7657fa536358d70136f328b12c8b5d52b600f77))
* vercel build fail ([8ad35a6](https://github.com/formkl/formkl/commit/8ad35a6a93a25e6d1ae65b2731db73360e870a70))
* always return true when use regex with logic validator ([3dd1e41](https://github.com/imrim12/formkl/commit/3dd1e418f181390600c656f6956b28d1bc8f99ec))
* circular dependencies build fail nx ([d6c59a6](https://github.com/imrim12/formkl/commit/d6c59a68df2c44b9f1d42018bb95ffef7b435605))
* editor web component lifecycle works differently on vue/react ([7d006b7](https://github.com/imrim12/formkl/commit/7d006b776c28ef33682cd0906c241ae4e78cb5e7))
* setup vitest component testing ([8a3f07d](https://github.com/imrim12/formkl/commit/8a3f07df969299dadb78e4c3b8e96b3ccbaf3dac))
* tsconfig.json ([d7657fa](https://github.com/imrim12/formkl/commit/d7657fa536358d70136f328b12c8b5d52b600f77))
* vercel build fail ([8ad35a6](https://github.com/imrim12/formkl/commit/8ad35a6a93a25e6d1ae65b2731db73360e870a70))

## [1.0.0-rc.2](https://github.com/imrim12/formkl/compare/1.0.0-rc.1...1.0.0-rc.2) (2022-11-23)


### Features

* added husky git hooks ([966c15f](https://github.com/imrim12/formkl/commit/966c15f7dae5aeebb7525104a135c4c9e7a4faad))
* added release-it package for release ([e46d2c0](https://github.com/imrim12/formkl/commit/e46d2c06161baea229213e5bb26be6386f44bd10))
* support form lifecycle hooks ([d2aff34](https://github.com/imrim12/formkl/commit/d2aff3436ad0c9e77b4d3728f0dcfe915f6be804))


### Bug Fixes

* always return true when use regex with logic validator ([3dd1e41](https://github.com/imrim12/formkl/commit/3dd1e418f181390600c656f6956b28d1bc8f99ec))
* build fail ([51298d8](https://github.com/imrim12/formkl/commit/51298d80524a2359195d3f861208c1b06e0108df))
* circular dependencies build fail nx ([d6c59a6](https://github.com/imrim12/formkl/commit/d6c59a68df2c44b9f1d42018bb95ffef7b435605))
* editor web component lifecycle works differently on vue/react ([7d006b7](https://github.com/imrim12/formkl/commit/7d006b776c28ef33682cd0906c241ae4e78cb5e7))
* setup vitest component testing ([8a3f07d](https://github.com/imrim12/formkl/commit/8a3f07df969299dadb78e4c3b8e96b3ccbaf3dac))
* tsconfig.json ([d7657fa](https://github.com/imrim12/formkl/commit/d7657fa536358d70136f328b12c8b5d52b600f77))
* vercel build fail ([8ad35a6](https://github.com/imrim12/formkl/commit/8ad35a6a93a25e6d1ae65b2731db73360e870a70))
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Please make sure to read the [Contributing Guide](https://formkl.org/learning/co

Thank you to all the people who already contributed to Vue!

<a href="https://github.com/formkl/formkl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=formkl/formkl" />
<a href="https://github.com/imrim12/formkl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=imrim12/formkl" />
</a>

Made with [contrib.rocks](https://contrib.rocks).
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Please make sure to read the [Contributing Guide](https://formkl.org/learning/co

Thank you to all the people who already contributed to the Formkl - Form Markup Language project!

<a href="https://github.com/formkl/formkl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=formkl/formkl" />
<a href="https://github.com/imrim12/formkl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=imrim12/formkl" />
</a>

Made with [contrib.rocks](https://contrib.rocks).
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export default {

nav: [{ text: "Syntax guide", link: "/syntax/form" }],

socialLinks: [{ icon: "github", link: "https://github.com/formkl/formkl" }],
socialLinks: [{ icon: "github", link: "https://github.com/imrim12/formkl" }],

editLink: {
pattern: "https://github.com/formkl/formkl/edit/main/docs/:path",
pattern: "https://github.com/imrim12/formkl/edit/main/docs/:path",
text: "Edit this page on GitHub",
},

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ hero:
link: /introduction
- theme: alt
text: Star on GitHub
link: https://github.com/formkl/formkl
link: https://github.com/imrim12/formkl

features:
- icon: ⚡️
Expand Down
4 changes: 2 additions & 2 deletions docs/learning/contribution-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ More about pnpm, please refer to [pnpm.io](https://pnpm.io), if you don't have i
npm i -g pnpm
```

Then clone the [repository](https://github.com/formkl/formkl) and open the cloned directory with your code editor or IDE.
Then clone the [repository](https://github.com/imrim12/formkl) and open the cloned directory with your code editor or IDE.
```bash
git clone [email protected]:formkl/formkl.git
git clone [email protected]:imrim12/formkl.git
```

Install the workspace dependencies
Expand Down
4 changes: 2 additions & 2 deletions docs/learning/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ But in our case, this is a brand new language and we need to build the syntax hi

We use [`@codemirror/autocomplete`](https://codemirror.net/6/docs/ref/#autocomplete) to define a set of keyword and definitions for auto complete.

The code is located at [`packages/editor/src/extensions/autocomplete.ts`](https://github.com/formkl/formkl/blob/9b5537cd326534208e2154b50664d9d098fb7113/packages/editor/src/extensions/autocomplete.ts)
The code is located at [`packages/editor/src/extensions/autocomplete.ts`](https://github.com/imrim12/formkl/blob/9b5537cd326534208e2154b50664d9d098fb7113/packages/editor/src/extensions/autocomplete.ts)

## Syntax Error Checker

Error Checker or as known as Linter is a very important part of the editor. It helps the user to find the syntax error and fix it, [`@codemirror/lint`](https://codemirror.net/6/docs/ref/#lint) is used for this.

We use our own [FORMKL Parser](/introduction#basic-example) to parse the syntax, it would be the correct syntax if it's parsed successfully. Otherwise, the parser will throw a syntax error.

The code is located at [`packages/editor/src/extensions/lint.ts`](https://github.com/formkl/formkl/blob/9b5537cd326534208e2154b50664d9d098fb7113/packages/editor/src/extensions/lint.ts).
The code is located at [`packages/editor/src/extensions/lint.ts`](https://github.com/imrim12/formkl/blob/9b5537cd326534208e2154b50664d9d098fb7113/packages/editor/src/extensions/lint.ts).
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"description": "Form markup language",
"packageManager": "[email protected]",
"scripts": {
"build": "nx run-many --target=build --all",
"nx": "nx",
"build": "nx build",
"build:all": "nx run-many --target=build --all",
"typecheck": "nx run-many --target=typecheck --all",
"test": "vitest run",
"test:ui": "vitest --ui",
Expand All @@ -17,7 +19,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/formkl/formkl.git"
"url": "git+https://github.com/imrim12/formkl.git"
},
"keywords": [
"form",
Expand All @@ -30,9 +32,9 @@
"author": "thecodeorigin",
"license": "MIT",
"bugs": {
"url": "https://github.com/formkl/formkl/issues"
"url": "https://github.com/imrim12/formkl/issues"
},
"homepage": "https://github.com/formkl/formkl#readme",
"homepage": "https://github.com/imrim12/formkl#readme",
"workspaces": [
"packages/**",
"sandbox",
Expand Down Expand Up @@ -64,10 +66,11 @@
"nx": "^15.0.0",
"release-it": "^15.5.0",
"rimraf": "^3.0.2",
"ts-node": "^10.9.1",
"typescript": "^4.8.4",
"vitest": "^0.24.4",
"vue": "^3.2.41",
"vue-tsc": "^1.0.9"
},
"version": "1.0.0-rc.2"
"version": "1.0.0-rc.3"
}
8 changes: 4 additions & 4 deletions packages/adapters/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formkl/vue",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"description": "A Vue adapter to generate usable Vue from component from Formkl syntax/schema",
"type": "module",
"main": "dist/index.es.js",
Expand All @@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/formkl/formkl.git",
"url": "git+https://github.com/imrim12/formkl.git",
"directory": "packages/adapters/vue"
},
"keywords": [
Expand All @@ -21,9 +21,9 @@
"author": "thecodeorigin",
"license": "MIT",
"bugs": {
"url": "https://github.com/formkl/formkl/issues"
"url": "https://github.com/imrim12/formkl/issues"
},
"homepage": "https://github.com/formkl/formkl#readme",
"homepage": "https://github.com/imrim12/formkl#readme",
"dependencies": {
"@formkl/plugin-vue": "workspace:*",
"@formkl/shared": "workspace:*",
Expand Down
8 changes: 4 additions & 4 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formkl/editor",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"description": "A universal Editor for Formkl using web component API",
"type": "module",
"exports": {
Expand All @@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/formkl/formkl.git",
"url": "git+ssh://[email protected]/imrim12/formkl.git",
"directory": "packages/editor"
},
"keywords": [
Expand All @@ -30,9 +30,9 @@
"author": "thecodeorigin",
"license": "MIT",
"bugs": {
"url": "https://github.com/formkl/formkl/issues"
"url": "https://github.com/imrim12/formkl/issues"
},
"homepage": "https://github.com/formkl/formkl#readme",
"homepage": "https://github.com/imrim12/formkl#readme",
"dependencies": {
"@codemirror/autocomplete": "^6.2.0",
"@codemirror/commands": "^6.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/language/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Please make sure to read the [Contributing Guide](https://formkl.org/learning/co

Thank you to all the people who already contributed to the Formkl - Form Markup Language project!

<a href="https://github.com/formkl/formkl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=formkl/formkl" />
<a href="https://github.com/imrim12/formkl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=imrim12/formkl" />
</a>

Made with [contrib.rocks](https://contrib.rocks).
Expand Down
8 changes: 4 additions & 4 deletions packages/language/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "formkl",
"version": "1.0.0-rc.2",
"version": "1.0.0-rc.3",
"description": "Form markup language",
"type": "module",
"exports": {
Expand All @@ -20,7 +20,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/formkl/formkl.git",
"url": "git+https://github.com/imrim12/formkl.git",
"directory": "language"
},
"keywords": [
Expand All @@ -34,9 +34,9 @@
"author": "thecodeorigin",
"license": "MIT",
"bugs": {
"url": "https://github.com/formkl/formkl/issues"
"url": "https://github.com/imrim12/formkl/issues"
},
"homepage": "https://github.com/formkl/formkl#readme",
"homepage": "https://github.com/imrim12/formkl#readme",
"dependencies": {
"@formkl/shared": "workspace:*",
"slugify": "^1.6.5"
Expand Down
42 changes: 22 additions & 20 deletions packages/language/src/__tests__/capitalized-syntax.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import parser from "formkl";
import parser, { defineForm } from "../";

describe("Used with Capitalized syntax", () => {
it("should parse the form syntax correctly", () => {
Expand All @@ -9,24 +9,26 @@ describe("Used with Capitalized syntax", () => {
}
}`);

expect(result).toStrictEqual({
model: "base",
sections: [
{
fields: [
{
type: "text",
label: "Text",
key: "text",
},
{
type: "text",
label: "Another",
key: "another",
},
],
},
],
});
expect(result).toStrictEqual(
defineForm({
model: "base",
sections: [
{
fields: [
{
type: "text",
label: "Text",
key: "text",
},
{
type: "text",
label: "Another",
key: "another",
},
],
},
],
}),
);
});
});
Loading

1 comment on commit 1bbf25d

@vercel
Copy link

@vercel vercel bot commented on 1bbf25d Dec 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.