Skip to content

Commit

Permalink
v3.0.0-rc.13
Browse files Browse the repository at this point in the history
  • Loading branch information
pozylon committed Jan 1, 2025
1 parent dee8f97 commit 8d2ba15
Show file tree
Hide file tree
Showing 37 changed files with 343 additions and 348 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Unchained Engine v3.0 RC10 ("Odi")
# Unchained Engine v3.0 RC13 ("Odi")

We are thrilled to announce Unchained Engine v3.0, 5 years after the first version. We started with an overloaded framework approach using Meteor and gradually removed dependency by dependency, getting closer to the metal and in-line with today's standards. Unchained Engine...
- ...is 100% ESM and self-hosted
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "docs",
"description": "Docs for Unchained Engine",
"private": true,
"version": "3.0.0-rc.12",
"version": "3.0.0-rc.13",
"license": "ISC",
"scripts": {
"dev": "docusaurus start",
Expand Down
14 changes: 7 additions & 7 deletions examples/kitchensink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "example-kitchensink",
"description": "Kitchensink for Unchained Engine",
"private": true,
"version": "3.0.0-rc.12",
"version": "3.0.0-rc.13",
"license": "EUPL-1.2",
"type": "module",
"homepage": "https://unchained.shop",
Expand Down Expand Up @@ -35,12 +35,12 @@
},
"dependencies": {
"@graphql-yoga/plugin-response-cache": "^3.12.8",
"@unchainedshop/api": "^3.0.0-rc.12",
"@unchainedshop/core-delivery": "^3.0.0-rc.12",
"@unchainedshop/core-payment": "^3.0.0-rc.12",
"@unchainedshop/platform": "^3.0.0-rc.12",
"@unchainedshop/plugins": "^3.0.0-rc.12",
"@unchainedshop/ticketing": "^3.0.0-rc.12",
"@unchainedshop/api": "^3.0.0-rc.13",
"@unchainedshop/core-delivery": "^3.0.0-rc.13",
"@unchainedshop/core-payment": "^3.0.0-rc.13",
"@unchainedshop/platform": "^3.0.0-rc.13",
"@unchainedshop/plugins": "^3.0.0-rc.13",
"@unchainedshop/ticketing": "^3.0.0-rc.13",
"bip32": "^4.0.0",
"bitcoinjs-lib": "^6.1.7",
"dotenv-extended": "^2.9.0",
Expand Down
6 changes: 3 additions & 3 deletions examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@unchainedshop/minimal",
"description": "Kitchensink for Unchained Engine",
"private": true,
"version": "3.0.0-rc.12",
"version": "3.0.0-rc.13",
"license": "EUPL-1.2",
"type": "module",
"homepage": "https://unchained.shop",
Expand Down Expand Up @@ -36,8 +36,8 @@
"dependencies": {
"@fastify/cookie": "^11.0.1",
"@fastify/session": "^11.0.2",
"@unchainedshop/platform": "^3.0.0-rc.12",
"@unchainedshop/plugins": "^3.0.0-rc.12",
"@unchainedshop/platform": "^3.0.0-rc.13",
"@unchainedshop/plugins": "^3.0.0-rc.13",
"connect-mongo": "^5.1.0",
"fastify": "^5.2.0"
},
Expand Down
44 changes: 44 additions & 0 deletions migration-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Migration Guide v1 -> v2

1. WHATWG Fetch Support required
Update Node to 18 or enable Experimental Fetch support on Node.js 16+

2. GraphQL Version & Express backed-in
```
npm install graphql@16
npm uninstall apollo-server-express body-parser graphql-scalars graphql-upload isomorphic-unfetch locale simpl-schema
```

3. Switch to Battery-Included

Remove custom login-with-single-sign-on and remove all code that involves loading standard plugins and/or gridfs/datatrans webhooks. Furthermore `startPlatform` will not hook into express and it will not start the graphql server automatically anymore. This has been changed to support other backend frameworks than Express and to support Lambda Mode of Apollo. For those reasons, `startPlatform` has been changed and now returns an object containing `unchainedAPI` and the `apolloGraphQLServer`.

To make it boot with express and the default plugins, you have to do the following:

Import the connect functions and the defaultModules:

```
import { defaultModules, connectDefaultPluginsToExpress4 } from '@unchainedshop/plugins';
import { connect } from '@unchainedshop/api/express/index.js';
```

Then pass defaultModules to the „modules“ prop of startPlatform:

```
const engine = await startPlatform({ modules: defaultModules, … });
```

Now, start the GraphQL server, connect it to Express and load the custom modules:

```
const engine = await startPlatform({ … });
await engine.apolloGraphQLServer.start(); // Counterintuitively, this has to be done before the platform is connected to express
connect(app, engine);
connectDefaultPluginsToExpress4(app, engine);
```

5. The userId’s that were used to set some internal db fields about updatedBy / createdBy need to be dropped from various functions. This will most propably affect seed code. Typescript will help you with that.

6. Examine the API Breaking Changes in the Changelog for API incompatibilities between 1.2 and 2.0.
Loading

0 comments on commit 8d2ba15

Please sign in to comment.