Skip to content

Commit

Permalink
Release 0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 28, 2024
1 parent af50667 commit 9dd66cf
Show file tree
Hide file tree
Showing 39 changed files with 3,617 additions and 2,829 deletions.
114 changes: 114 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<!--
---------------------------------------------------------------------------------------------
Copyright (c) Quatico Solutions AG. All rights reserved.
Licensed under the MIT License. See LICENSE in the project root for license information.
---------------------------------------------------------------------------------------------
-->
<!-- markdownlint-disable MD024 -->

# Releases

Release notes follow the [keep a changelog](https://keepachangelog.com/en/1.1.0/) format.

## [Unreleased]

## [0.6.2] - 2024-03-25

### Fixed

- Rejects promise if transport failed (response not ok) in formdata-fetch (server and client). Previously, we attempted to retrieve the response as text even if the response was not ok.

## [0.6.1]

### Changed

- Upgraded TypeScript dependency to `5.0.x`
- Upgraded `@quatico/websmith-*` dependencies to `0.4.0`
- Made the client transformation code more strict. Throws an error during the code generation if the client function accepts a destructured object or a function as parameter.

### Removed

- Removed `packages/java` focusing the project on nodejs.
- Removed unused code and dependencies.

## [0.3.0]

### Added

- Support for `merge: true` in `@quatico/magellan-client/transport/config.js` to merge the configuration with the
existing configuration of a previous magellan-client frontend instead of replacing it.

### Changed

- Updates @quatico/magellan-client documentation to current transport configuration.

## [0.2.2] - 2023-02-26

### Changed

- Exposing additional server api aspects to enable custom express server usage with Magellan
- Remove maven-frontend-plugin dependency from Serialization maven package.

## [0.2.1] - 2023-02-07

### Added

- Serialization and deserialization errors during transport-request handling reject the promise.

### Fixed

- Removes unnecessary dependency to maven-flatten-plugin in serialization package.

## [0.2.1] - 2023-02-07

### Added

- Support --transpileOnly command line flag for `magellan compile`

### Changed

- Update to websmith v0.3.5 addressing the undesirable error output.
- Separate lint and lint:fix: pre-commit hooks now fix linting; CI only validates that the linting rules are followed.

## [0.2.0] - 2022-12-14

### Added

- service functions throwing errors now yield a rejection of the client promise with the error message.
- service functions throwing errors now yield a console.error with the error stack on the client if the server is not in
production mode.

### Changed

- magellan-server has tslib as production dependency to ease integration in custom servers.

## [0.1.4] - 2022-11-08

SPA Routing

### Added

- Wildcard paths not pointing to static files now redirect to the static root path.

## [0.1.3] - 2022-08-04

Additional supported serializations

### Added

- Implements date transport support for LocalDate and LocalDateTime.

### Fixed

- Implements logic to handle incomplete replacement transport configurations.

## [0.1.0] - 2022-07-29

Initial Release

### Added

- (Almost) invisible transport layer between browser and JVM
- Effortless configuration of service endpoints
- Automatic serialization of input/output values
- Transparent error messages and exception handling
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
---------------------------------------------------------------------------------------------
-->

# Magellan
# Magellan

[![CI](https://github.com/quatico-solutions/magellan/actions/workflows/protect-stable.yml/badge.svg)](https://github.com/quatico-solutions/magellan/actions/workflows/protect-stable.yml) [![npm version](https://badge.fury.io/js/@quatico%2Fmagellan-cli.svg)](https://www.npmjs.com/search?q=%40quatico)

The Magellan project provides compiler tooling and a runtime API for remote execution of
Expand Down Expand Up @@ -61,8 +62,8 @@ Add an example function that returns a greeting `src/services/greet-me.ts`:

```typescript
export const greetMe = async (name: string): Promise<string> => {
// In the browser, accessing process.arch cause an error.
return `Hello ${name}, great to see you on ${ typeof window === "undefined" ? `${process.arch} server`: "browser"}!`;
// In the browser, accessing process.arch causes an error.
return `Hello ${name}, great to see you I'm Magellan running on "${ typeof window === "undefined" ? `${process.arch}" server`: "browser"}!`;
}
```

Expand All @@ -71,7 +72,9 @@ export const greetMe = async (name: string): Promise<string> => {
Update `src/App.tsx` to use the greeting service and show the greeting to the visitor.

```diff
+ import { useEffect, useState } from "react";
import logo from './logo.svg';
+ import { greetMe } from "./services/greet-me";

import './App.css';

Expand Down Expand Up @@ -139,6 +142,7 @@ Update the `package.json` to use [react-app-rewired](https://www.npmjs.com/packa

```diff
{
...
"scripts": {
- "start": "react-scripts start",
+ "start": "react-app-rewired start",
Expand All @@ -148,8 +152,9 @@ Update the `package.json` to use [react-app-rewired](https://www.npmjs.com/packa
+ "test": "react-app-rewired test",
"eject": "react-scripts eject",
+ "compile": "magellan compile",
+ "serve": "magellan serve ./lib/client --serverModuleDir ./lib/server -p 3001"
}
+ "serve": "magellan serve ./lib/client --serverModuleDir ./lib/server --port 3001"
},
...
}
```

Expand All @@ -158,6 +163,7 @@ Update `tsconfig.json` to enable TypeScript to generate output
```diff
{
"compilerOptions": {
...
- "noEmit": true,
+ "outDir": "./lib/client",
}
Expand Down
6 changes: 6 additions & 0 deletions docs/Contribution.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
---------------------------------------------------------------------------------------------
Copyright (c) Quatico Solutions AG. All rights reserved.
Licensed under the MIT License. See LICENSE in the project root for license information.
---------------------------------------------------------------------------------------------
-->
# Contributing to Magellan

There are three great ways to contribute to the Magellan project: logging bugs, submitting pull requests, and creating suggestions.
Expand Down
6 changes: 6 additions & 0 deletions docs/technical/server-to-client-communication.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
---------------------------------------------------------------------------------------------
Copyright (c) Quatico Solutions AG. All rights reserved.
Licensed under the MIT License. See LICENSE in the project root for license information.
---------------------------------------------------------------------------------------------
-->
# Response and error propagation of service functions from server to client

magellan supports automatic error propagation from the server executed version of a @service annoted function to the client.
Expand Down
2 changes: 2 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export { readE2eTestData };
console.debug = () => undefined;
console.info = () => undefined;
console.log = () => undefined;
console.warn = () => undefined;
console.error = () => undefined;

jest.mock("fs", () => {
return createFs(jest.requireActual("fs"));
Expand Down
6 changes: 3 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.3.0"
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.6.2"
}
2 changes: 1 addition & 1 deletion license-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
"**/test-data",
"**/__data__"
]
}
}
72 changes: 46 additions & 26 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["lint", "test", "build", "test:e2e"],
"cacheDirectory": ".nx-cache"
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/lib"]
},
"dist": {
"dependsOn": [
"^dist"
]
},
"publish-npm": {
"dependsOn": [
"^publish-npm"
]
}
},
"defaultBase": "develop"
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": [
"lint",
"test",
"build",
"test:e2e"
],
"cacheDirectory": ".nx-cache"
}
}
},
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
],
"outputs": [
"{projectRoot}/lib"
]
},
"dist": {
"dependsOn": [
"^dist"
]
},
"publish-npm": {
"dependsOn": [
"^publish-npm"
]
}
},
"defaultBase": "develop",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"sharedGlobals": [],
"production": [
"default"
]
}
}
28 changes: 10 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@quatico/magellan",
"description": "",
"version": "0.3.0",
"version": "0.6.2",
"keywords": [
"typescript",
"java",
Expand All @@ -17,17 +17,11 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/quatico-solutions/magellan.git"
},
"bugs": {
"url": "https://github.com/quatico-solutions/magellan/issues"
},
"homepage": "https://github.com/quatico-solutions/magellan#readme",
"workspaces": {
"packages": [
"packages/*"
]
"url": "https://github.com/quatico-solutions/magellan"
},
"workspaces": [
"packages/*"
],
"scripts": {
"clean": "nx run-many --target=clean",
"lint": "nx run-many --target=lint",
Expand All @@ -42,14 +36,12 @@
"dist": "nx run-many --target=dist --skip-nx-cache",
"prepare-release": "yarn dist && yarn lerna version --force-publish",
"prepare-prerelease": "yarn dist && yarn lerna version prerelease -y --force-publish",
"publish-npm": "lerna run --stream publish-npm",
"publish-npm": "nx run-many --target=publish-npm",
"license:check": "license-check-and-add check -f license-config.json",
"license:add": "license-check-and-add add -f license-config.json",
"license:remove": "license-check-and-add remove -f license-config.json",
"prepare": "husky install"
"license:remove": "license-check-and-add remove -f license-config.json"
},
"devDependencies": {
"@nrwl/nx-cloud": "latest",
"@swc/core": "^1.3.57",
"@swc/jest": "^0.2.26",
"@types/node": "16",
Expand All @@ -61,13 +53,13 @@
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-testing-library": "^5.11.0",
"husky": "^8.0.3",
"jest": "^29.5.0",
"lerna": "^6.6.2",
"lerna": "6.6.x",
"license-check-and-add": "^4.0.5",
"lint-staged": "^13.2.2",
"memfs": "3.5.x",
"nx": "16.1.x",
"nx": "16.5.0",
"nx-cloud": "16.0.5",
"prettier": "^2.8.8",
"regenerator-runtime": "0.13.11",
"rimraf": "5.0.0",
Expand Down
Loading

0 comments on commit 9dd66cf

Please sign in to comment.