diff --git a/CHANGELOG.md b/CHANGELOG.md index 72d87095..678454b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,41 @@ +# v0.9.0 +[2025-01-10] + +### Features + +* \[[599](https://github.com/MaskingTechnology/jitar/pull/599)] feat: fractional module segmentation (#599) by Peter van Vliet +* \[[596](https://github.com/MaskingTechnology/jitar/pull/596)] feat: module re-export support (#596) by Peter van Vliet +* \[[590](https://github.com/MaskingTechnology/jitar/pull/590)] feat: index resolution (#590) by Bas Meeuwissen +* \[[571](https://github.com/MaskingTechnology/jitar/pull/571)] feat: resource configuration (#571) by Bas Meeuwissen +* \[[563](https://github.com/MaskingTechnology/jitar/pull/563)] feat(services): deregister worker on exit (#563) by Bas Meeuwissen + +### Chores + +* \[[591](https://github.com/MaskingTechnology/jitar/pull/591)] chore: http tests (#591) by Bas Meeuwissen +* \[[594](https://github.com/MaskingTechnology/jitar/pull/594)] chore(deps): january updates (#594) by Bas Meeuwissen +* \[[589](https://github.com/MaskingTechnology/jitar/pull/589)] chore: add tests for the sourcing package (#589) by Bas Meeuwissen +* \[[588](https://github.com/MaskingTechnology/jitar/pull/588)] chore: configuration test additions (#588) by Bas Meeuwissen +* \[[582](https://github.com/MaskingTechnology/jitar/pull/582)] chore: await uncaught promises (#582) by Bas Meeuwissen +* \[[579](https://github.com/MaskingTechnology/jitar/pull/579)] chore(deps): website and docs (#579) by Bas Meeuwissen +* \[[577](https://github.com/MaskingTechnology/jitar/pull/577)] chore(build): run codeql in parallel (#577) by Bas Meeuwissen +* \[[575](https://github.com/MaskingTechnology/jitar/pull/575)] chore(deps): vulnerabilities update (#575) by Bas Meeuwissen +* \[[569](https://github.com/MaskingTechnology/jitar/pull/569)] chore: fix sonar warnings (#569) by Bas Meeuwissen +* \[[566](https://github.com/MaskingTechnology/jitar/pull/566)] npm: bump cross-spawn from 7.0.3 to 7.0.6 (#566) by dependabot[bot] +* \[[558](https://github.com/MaskingTechnology/jitar/pull/558)] chore(build): more sonar issues (#558) by Bas Meeuwissen +* \[[556](https://github.com/MaskingTechnology/jitar/pull/556)] chore(build): sonar issues (#556) by Bas Meeuwissen +* \[[554](https://github.com/MaskingTechnology/jitar/pull/554)] chore(build): eslint 9 (#554) by Bas Meeuwissen + # v0.8.0 -[2024-10-04] +[2024-10-05] ### Features * \[[550](https://github.com/MaskingTechnology/jitar/pull/550)] feat: application builds (#550) by Peter van Vliet +### Chores + +* \[[553](https://github.com/MaskingTechnology/jitar/pull/553)] chore: release v0.8.0 (#553) by Bas Meeuwissen + # v0.7.6 [2024-09-20] diff --git a/documentation/docs/deploy/resources.md b/documentation/docs/deploy/resources.md index c3dd1483..995da074 100644 --- a/documentation/docs/deploy/resources.md +++ b/documentation/docs/deploy/resources.md @@ -32,7 +32,7 @@ The file has the following structure: ] ``` -::: info +::: info NOTE The `/index` part is optional. If the module is a directory, Jitar will automatically look for the index file. ::: diff --git a/documentation/docs/deploy/segmentation.md b/documentation/docs/deploy/segmentation.md index f9d213c7..eb9fa47a 100644 --- a/documentation/docs/deploy/segmentation.md +++ b/documentation/docs/deploy/segmentation.md @@ -74,6 +74,19 @@ The import names must correspond with the export names in the module. You can al ``` +Index files are also supported. Instead of specifying a module file, just specify the folder containing the index file. + +```json +{ + "./domain/some-folder": + { + "first": { "access": "public" }, + "second": { "access": "public" }, + … + } +} +``` + Imports have multiple properties that can be configured. These properties will be explained next. ### Trusted clients @@ -82,7 +95,7 @@ When building a distributed application, you don't want all functions to be avai Any client that wants to access a protected function must provide a valid key. It needs to be added to the http header `X-Jitar-Trust-Key`. Any worker that has a valid key is automatically considered a trusted client, and adds the access key to the http header of outgoing requests. Any worker that doesn't have a valid access key is considered an untrusted client and can only access `public` functions. -::: info Note +::: info NOTE To enable trusted clients, the gateway must always have a trusted key configured. Any worker that wants to register itself as a trusted client, must have the same value for the `trustKey` in its configuration. ::: diff --git a/lerna.json b/lerna.json index 58f083c2..8b46985c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "0.8.2", + "version": "0.9.0", "command": { "version": { "message": "chore(release): publish %s" diff --git a/migrations/migrate-from-0.8.x-to-0.9.0.md b/migrations/migrate-from-0.8.x-to-0.9.0.md new file mode 100644 index 00000000..8d67c6a1 --- /dev/null +++ b/migrations/migrate-from-0.8.x-to-0.9.0.md @@ -0,0 +1,11 @@ +# Migrate from 0.8.x to 0.9.0 + +This release contains one breaking change. In previous versions of Jitar, segment files were scanned from the root of the project and had to have the extension `.segment.json`. This is no longer the case. The location of the segment files is now configurable. + +The default location is `./segments` and can be overwritten in the `jitar.json` configuration file. The configuration key is `segments`. + +```json +{ + "segments": "./my-segments" +} +``` diff --git a/package-lock.json b/package-lock.json index b25bd846..b1d75d1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jitar-monorepo", - "version": "0.8.0", + "version": "0.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "jitar-monorepo", - "version": "0.8.0", + "version": "0.9.0", "license": "MIT", "workspaces": [ "packages/*", @@ -16127,7 +16127,7 @@ } }, "packages/create-jitar": { - "version": "0.8.2", + "version": "0.9.0", "license": "MIT", "dependencies": { "kolorist": "^1.8.0", @@ -16176,7 +16176,7 @@ } }, "packages/jitar": { - "version": "0.8.2", + "version": "0.9.0", "license": "MIT", "dependencies": { "dotenv": "^16.4.7", @@ -16296,7 +16296,7 @@ }, "packages/plugin-vite": { "name": "@jitar/plugin-vite", - "version": "0.8.2", + "version": "0.9.0", "license": "MIT", "peerDependencies": { "vite": ">=4.0.0 || >=5.0.0 || >=6.0.0" diff --git a/package.json b/package.json index 87efea4b..e3ca0395 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jitar-monorepo", - "version": "0.8.0", + "version": "0.9.0", "private": true, "description": "Monorepo configuration for Jitar.", "license": "MIT", diff --git a/packages/create-jitar/package.json b/packages/create-jitar/package.json index 18c55015..424d8e41 100644 --- a/packages/create-jitar/package.json +++ b/packages/create-jitar/package.json @@ -1,6 +1,6 @@ { "name": "create-jitar", - "version": "0.8.2", + "version": "0.9.0", "type": "module", "license": "MIT", "author": "Masking Technology (https://jitar.dev)", @@ -50,5 +50,5 @@ "url": "https://github.com/MaskingTechnology/jitar/issues" }, "homepage": "https://jitar.dev", - "gitHead": "0bff066d2b51e97e910486e72b9f6b089bae96b1" + "gitHead": "ab343592336927a9f9d1478da22d8e36ebf89382" } diff --git a/packages/create-jitar/templates/jitar-only/jitar.json b/packages/create-jitar/templates/jitar-only/jitar.json index 4bb49481..beae5c58 100644 --- a/packages/create-jitar/templates/jitar-only/jitar.json +++ b/packages/create-jitar/templates/jitar-only/jitar.json @@ -1,4 +1,5 @@ { "source": "./dist", - "target": "./.jitar" + "target": "./.jitar", + "segments": "./segments" } \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/package.json b/packages/create-jitar/templates/jitar-only/package.json index db47b543..b09e4bc9 100644 --- a/packages/create-jitar/templates/jitar-only/package.json +++ b/packages/create-jitar/templates/jitar-only/package.json @@ -10,6 +10,6 @@ "hello": "jitar start --service=services/hello.json" }, "dependencies": { - "jitar": "^0.8.0" + "jitar": "^0.9.0" } } \ No newline at end of file diff --git a/packages/create-jitar/templates/jitar-only/segments/hello.segment.json b/packages/create-jitar/templates/jitar-only/segments/hello.json similarity index 100% rename from packages/create-jitar/templates/jitar-only/segments/hello.segment.json rename to packages/create-jitar/templates/jitar-only/segments/hello.json diff --git a/packages/create-jitar/templates/jitar-only/segments/hi.segment.json b/packages/create-jitar/templates/jitar-only/segments/hi.json similarity index 100% rename from packages/create-jitar/templates/jitar-only/segments/hi.segment.json rename to packages/create-jitar/templates/jitar-only/segments/hi.json diff --git a/packages/create-jitar/templates/lit/jitar.json b/packages/create-jitar/templates/lit/jitar.json index b4c921fe..beae5c58 100644 --- a/packages/create-jitar/templates/lit/jitar.json +++ b/packages/create-jitar/templates/lit/jitar.json @@ -1,4 +1,5 @@ { "source": "./dist", - "target": "./dist" + "target": "./.jitar", + "segments": "./segments" } \ No newline at end of file diff --git a/packages/create-jitar/templates/lit/package.json b/packages/create-jitar/templates/lit/package.json index dff0656f..96390c0e 100644 --- a/packages/create-jitar/templates/lit/package.json +++ b/packages/create-jitar/templates/lit/package.json @@ -20,11 +20,11 @@ "standalone": "jitar start --service=services/standalone.json" }, "dependencies": { - "jitar": "^0.8.0", + "jitar": "^0.9.0", "lit": "^3.2.0" }, "devDependencies": { - "@jitar/plugin-vite": "^0.8.0", + "@jitar/plugin-vite": "^0.9.0", "typescript": "^5.5.3", "vite": "^5.4.8" } diff --git a/packages/create-jitar/templates/lit/segments/default.segment.json b/packages/create-jitar/templates/lit/segments/default.json similarity index 100% rename from packages/create-jitar/templates/lit/segments/default.segment.json rename to packages/create-jitar/templates/lit/segments/default.json diff --git a/packages/create-jitar/templates/react/jitar.json b/packages/create-jitar/templates/react/jitar.json index b4c921fe..beae5c58 100644 --- a/packages/create-jitar/templates/react/jitar.json +++ b/packages/create-jitar/templates/react/jitar.json @@ -1,4 +1,5 @@ { "source": "./dist", - "target": "./dist" + "target": "./.jitar", + "segments": "./segments" } \ No newline at end of file diff --git a/packages/create-jitar/templates/react/package.json b/packages/create-jitar/templates/react/package.json index cf52ee49..d045d175 100644 --- a/packages/create-jitar/templates/react/package.json +++ b/packages/create-jitar/templates/react/package.json @@ -11,12 +11,12 @@ "standalone": "jitar start --service=services/standalone.json" }, "dependencies": { - "jitar": "^0.8.0", + "jitar": "^0.9.0", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { - "@jitar/plugin-vite": "^0.8.0", + "@jitar/plugin-vite": "^0.9.0", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", diff --git a/packages/create-jitar/templates/react/segments/default.segment.json b/packages/create-jitar/templates/react/segments/default.json similarity index 100% rename from packages/create-jitar/templates/react/segments/default.segment.json rename to packages/create-jitar/templates/react/segments/default.json diff --git a/packages/create-jitar/templates/solid/jitar.json b/packages/create-jitar/templates/solid/jitar.json index b4c921fe..beae5c58 100644 --- a/packages/create-jitar/templates/solid/jitar.json +++ b/packages/create-jitar/templates/solid/jitar.json @@ -1,4 +1,5 @@ { "source": "./dist", - "target": "./dist" + "target": "./.jitar", + "segments": "./segments" } \ No newline at end of file diff --git a/packages/create-jitar/templates/solid/package.json b/packages/create-jitar/templates/solid/package.json index 48b045fe..1a0b92f5 100644 --- a/packages/create-jitar/templates/solid/package.json +++ b/packages/create-jitar/templates/solid/package.json @@ -13,14 +13,14 @@ }, "license": "MIT", "devDependencies": { - "@jitar/plugin-vite": "^0.8.0", + "@jitar/plugin-vite": "^0.9.0", "@types/express": "^4.17.21", "typescript": "^5.5.3", "vite": "^5.3.3", "vite-plugin-solid": "^2.10.2" }, "dependencies": { - "jitar": "^0.8.0", + "jitar": "^0.9.0", "solid-js": "^1.8.18" } } diff --git a/packages/create-jitar/templates/solid/segments/default.segment.json b/packages/create-jitar/templates/solid/segments/default.json similarity index 100% rename from packages/create-jitar/templates/solid/segments/default.segment.json rename to packages/create-jitar/templates/solid/segments/default.json diff --git a/packages/create-jitar/templates/svelte/jitar.json b/packages/create-jitar/templates/svelte/jitar.json index b4c921fe..beae5c58 100644 --- a/packages/create-jitar/templates/svelte/jitar.json +++ b/packages/create-jitar/templates/svelte/jitar.json @@ -1,4 +1,5 @@ { "source": "./dist", - "target": "./dist" + "target": "./.jitar", + "segments": "./segments" } \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/package.json b/packages/create-jitar/templates/svelte/package.json index 498a1b8b..9e813903 100644 --- a/packages/create-jitar/templates/svelte/package.json +++ b/packages/create-jitar/templates/svelte/package.json @@ -11,7 +11,7 @@ "standalone": "jitar start --service=services/standalone.json" }, "devDependencies": { - "@jitar/plugin-vite": "^0.8.0", + "@jitar/plugin-vite": "^0.9.0", "@sveltejs/vite-plugin-svelte": "^3.1.2", "@tsconfig/svelte": "^5.0.4", "svelte": "^4.2.19", @@ -21,6 +21,6 @@ "vite": "^5.3.3" }, "dependencies": { - "jitar": "^0.8.0" + "jitar": "^0.9.0" } } \ No newline at end of file diff --git a/packages/create-jitar/templates/svelte/segments/default.segment.json b/packages/create-jitar/templates/svelte/segments/default.json similarity index 100% rename from packages/create-jitar/templates/svelte/segments/default.segment.json rename to packages/create-jitar/templates/svelte/segments/default.json diff --git a/packages/create-jitar/templates/vue/jitar.json b/packages/create-jitar/templates/vue/jitar.json index b4c921fe..beae5c58 100644 --- a/packages/create-jitar/templates/vue/jitar.json +++ b/packages/create-jitar/templates/vue/jitar.json @@ -1,4 +1,5 @@ { "source": "./dist", - "target": "./dist" + "target": "./.jitar", + "segments": "./segments" } \ No newline at end of file diff --git a/packages/create-jitar/templates/vue/package.json b/packages/create-jitar/templates/vue/package.json index 00ad47b8..2df528fa 100644 --- a/packages/create-jitar/templates/vue/package.json +++ b/packages/create-jitar/templates/vue/package.json @@ -11,11 +11,11 @@ "standalone": "jitar start --service=services/standalone.json" }, "dependencies": { - "jitar": "^0.8.0", + "jitar": "^0.9.0", "vue": "^3.4.31" }, "devDependencies": { - "@jitar/plugin-vite": "^0.8.0", + "@jitar/plugin-vite": "^0.9.0", "@vitejs/plugin-vue": "^5.0.5", "typescript": "^5.5.3", "vite": "^5.3.3", diff --git a/packages/create-jitar/templates/vue/segments/default.segment.json b/packages/create-jitar/templates/vue/segments/default.json similarity index 100% rename from packages/create-jitar/templates/vue/segments/default.segment.json rename to packages/create-jitar/templates/vue/segments/default.json diff --git a/packages/jitar/package.json b/packages/jitar/package.json index d96e3301..524da55c 100644 --- a/packages/jitar/package.json +++ b/packages/jitar/package.json @@ -1,6 +1,6 @@ { "name": "jitar", - "version": "0.8.2", + "version": "0.9.0", "description": "Distributed runtime for JavaScript and TypeScript to chop monolithic applications into micros.", "author": "Masking Technology (https://jitar.dev)", "license": "MIT", @@ -63,5 +63,5 @@ "full stack", "web applications" ], - "gitHead": "0bff066d2b51e97e910486e72b9f6b089bae96b1" + "gitHead": "ab343592336927a9f9d1478da22d8e36ebf89382" } diff --git a/packages/plugin-vite/package.json b/packages/plugin-vite/package.json index 1e2d7343..524ec869 100644 --- a/packages/plugin-vite/package.json +++ b/packages/plugin-vite/package.json @@ -1,6 +1,6 @@ { "name": "@jitar/plugin-vite", - "version": "0.8.2", + "version": "0.9.0", "description": "Vite plugin for Jitar.", "author": "Masking Technology (https://jitar.dev)", "license": "MIT", @@ -47,5 +47,5 @@ "vite-plugin", "jitar" ], - "gitHead": "0bff066d2b51e97e910486e72b9f6b089bae96b1" + "gitHead": "ab343592336927a9f9d1478da22d8e36ebf89382" }