Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into hang-up/fix-ecosy…
Browse files Browse the repository at this point in the history
…stem-vue-documentation
  • Loading branch information
hang-up committed Mar 28, 2024
2 parents a7e4d72 + d8cbffa commit da98569
Show file tree
Hide file tree
Showing 203 changed files with 27,105 additions and 20,237 deletions.
22 changes: 7 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,17 @@ module.exports = {
commonjs: true,
es6: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'eslint-config-prettier'],
extends: [
"eslint:recommended",
"plugin:react/recommended",
"eslint-config-prettier",
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', 'eslint-plugin-prettier'],
rules: {
'prettier/prettier': [
'error',
{
tabWidth: 2,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: true,
}
],
sourceType: "module",
},
plugins: ["react"],
};
6 changes: 3 additions & 3 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- master
pull_request:
branches:
- '*'
- "*"

jobs:
build_and_deploy:
Expand All @@ -16,8 +16,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
node-version: 20
cache: "npm"
- name: Build website
run: |
npm ci
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
static/img/icons
9 changes: 1 addition & 8 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{
"bracketSpacing": true,
"printWidth": 80,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"jsxBracketSameLine": true
}
{}
4 changes: 2 additions & 2 deletions blog/2016-02-26-a-case-for-soa-in-the-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ You can load a sofe service either with static or asynchronous imports.

```js
// Static imports
import auth from 'auth-service!sofe';
import auth from "auth-service!sofe";
const user = auth.getLoggedInUser();
// Asynchronous imports
System.import('auth-service!sofe').then(auth => auth.getLoggedInUser());
System.import("auth-service!sofe").then((auth) => auth.getLoggedInUser());
```

The real power behind sofe is that services are resolved at run-time, making them unversioned. If <strong>auth-service</strong> is redeployed, it is immediately made available to all upstream dependencies. The above scenario becomes much easier to resolve because there is only one version of each shared library as services. This is powerful because it allows you to deploy once, update everywhere. Also because the code is loaded at run-time, we can also enable developer tools to override what service is loaded into your application. Or in other words, you can test code on production without actually deploying to production.
Expand Down
36 changes: 18 additions & 18 deletions blog/2016-12-16-a-step-by-step-guide-to-single-spa.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ So for now, just have a `<script>` to a single JavaScript file (root-application
Since Webpack is probably the more common use case, my code examples from here on will assume that you’re using Webpack 2. The equivalent Webpack 1 or JSPM code has all the same concepts and only some minor code differences.

```html
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
Expand All @@ -61,22 +61,22 @@ Another way to look at it is that single-spa is a master router on top of your o
To do this, first `npm install single-spa` and then call the [registerApplication](https://github.com/single-spa/single-spa/blob/master/docs/root-application.md#declaring-child-applications) function:

```js
import {registerApplication, start} from 'single-spa';
import { registerApplication, start } from "single-spa";

// Register your first application with single-spa. More apps will be registered as you create them
registerApplication('cool-app', loadCoolApp, isCoolAppActive);
registerApplication("cool-app", loadCoolApp, isCoolAppActive);

// Tell single-spa that you're ready for it to mount your application to the DOM
start();

// This is a "loading function"
function loadCoolApp() {
return import('./cool-app/cool.app.js');
return import("./cool-app/cool.app.js");
}

// This is an "activity function"
function isCoolAppActive() {
return window.location.hash.startsWith('#/cool');
return window.location.hash.startsWith("#/cool");
}
```

Expand Down Expand Up @@ -116,9 +116,9 @@ Here is a simple example:
let user;

export function bootstrap() {
return fetch('/api/users/0')
.then(response => response.json())
.then(json => (user = json));
return fetch("/api/users/0")
.then((response) => response.json())
.then((json) => (user = json));
}

export function mount() {
Expand All @@ -128,7 +128,7 @@ export function mount() {
* can implement a "mount" and "unmount" to become a single-spa application.
*/
return Promise.resolve().then(() => {
document.getElementById('user-app').innerHTML = `
document.getElementById("user-app").innerHTML = `
<div>
Hello ${user.name}!
<div>
Expand All @@ -141,7 +141,7 @@ export function unmount() {
* or vue.$destroy()
*/
return Promise.resolve().then(() => {
document.getElementById('user-app').innerHTML = '';
document.getElementById("user-app").innerHTML = "";
});
}
```
Expand All @@ -159,17 +159,17 @@ Each child application can be written in any framework, so long as it implements
So going back to our previous example, we could choose to write our “cool.app.js” as an Angular 1 app, and choose something else for future apps:

```js
import singleSpaAngularJS from 'single-spa-angularjs';
import angular from 'angular';
import './app.module.js';
import './routes.js';
import singleSpaAngularJS from "single-spa-angularjs";
import angular from "angular";
import "./app.module.js";
import "./routes.js";

const domElementGetter = () => document.getElementById('cool-app');
const domElementGetter = () => document.getElementById("cool-app");

const angularLifecycles = singleSpaAngularJS({
angular,
domElementGetter,
mainAngularModule: 'single-spa-app',
mainAngularModule: "single-spa-app",
uiRouter: true,
preserveGlobal: true,
});
Expand All @@ -185,12 +185,12 @@ export const mount = [angularLifecycles.mount];
export const unmount = [angularLifecycles.unmount];

function aboutToBootstrap() {
console.log('about to bootstrapping');
console.log("about to bootstrapping");
return Promise.resolve();
}

function doneBootstrap() {
console.log('finished bootstrapping');
console.log("finished bootstrapping");
return Promise.resolve();
}
```
Expand Down
2 changes: 1 addition & 1 deletion blog/2018-06-19-single-spa-parcels-explained.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ We’d love to get your feedback on parcels. What do you think of this new way o
Check out the [official docs](https://github.com/single-spa/single-spa/blob/master/docs/parcels.md) for more examples, explanations, and [api documentation](https://github.com/single-spa/single-spa/blob/master/docs/parcels-api.md).
And let us know your thoughts in the [single-spa Slack channel](https://join.slack.com/t/single-spa/shared_invite/zt-21skfl7l3-leF7JkoKwKaRIPX~N6jXJQ), a [Github issue](https://github.com/single-spa/single-spa/issues), or [on Twitter](https://twitter.com/Single_spa)!
And let us know your thoughts in the [single-spa Slack channel](https://join.slack.com/t/single-spa/shared_invite/zt-2efw13fg4-oJgemeyCUJv4~JrQlYttnA), a [Github issue](https://github.com/single-spa/single-spa/issues), or [on Twitter](https://twitter.com/Single_spa)!
2 changes: 1 addition & 1 deletion blog/2020-02-24-single-spa-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ This change does not mean anything drastic for single-spa. Its license was and i

We are actively [translating the single-spa documentation to Chinese](https://github.com/single-spa/zh-hans.single-spa.js.org), and hope to add other languages soon. We will add full [Angular 9 support](https://github.com/single-spa/single-spa-angular/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+angular+9) soon, and hope to add [server rendering](https://github.com/single-spa/single-spa/issues/103) in an upcoming release.

Please [contribute to our code](/docs/contributing-overview) and [ecosystem](/docs/ecosystem), [join our single-spa slack channel](https://join.slack.com/t/single-spa/shared_invite/zt-21skfl7l3-leF7JkoKwKaRIPX~N6jXJQ), [follow our official Twitter account](https://twitter.com/Single_spa), and contribute to [our open collective](https://opencollective.com/single-spa). The [single-spa core team](/contributors) all have full-time jobs and maintain this project on a volunteer basis.
Please [contribute to our code](/docs/contributing-overview) and [ecosystem](/docs/ecosystem), [join our single-spa slack channel](https://join.slack.com/t/single-spa/shared_invite/zt-2efw13fg4-oJgemeyCUJv4~JrQlYttnA), [follow our official Twitter account](https://twitter.com/Single_spa), and contribute to [our open collective](https://opencollective.com/single-spa). The [single-spa core team](/contributors) all have full-time jobs and maintain this project on a volunteer basis.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ These three new members will be joining current members Joel Denning, Carlos Fil

As part of this team update, we’ll also be creating a public roadmap, providing transparency about Single-Spa's future direction. To maintain transparency and encourage collaboration, we're establishing monthly meetings where the core team will discuss progress, challenges, and ideas. Meeting notes will be publicly available, ensuring that the community is well-informed and able to participate in our discussions.

So stay tuned and join us on this journey shaping the future of microfrontends.
So stay tuned and join us on this journey shaping the future of microfrontends.
3 changes: 2 additions & 1 deletion blog/2023-11-07-core-team-meeting-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Attendees: Joel Denning, Milan Kovacic, Jake Hayes
- Maintenance update/plan

## Roadmap Brainstorm

- Adding unit tests to existing projects
- SystemJS -> ESM migration
- create-single-spa update (https://github.com/cruft/cruft)
Expand All @@ -29,4 +30,4 @@ Attendees: Joel Denning, Milan Kovacic, Jake Hayes
- Consolidate example projects
- Feature voting
- Automated integration tests for popular frameworks
- Update create-single-spa dependencies
- Update create-single-spa dependencies
30 changes: 15 additions & 15 deletions blog/2023-11-27-single-spa-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ If externalizing single-spa in your webpack config (very common, and the default
// webpack.config.js
module.exports = {
resolve: {
"alias": {
"single-spa": require.resolve("single-spa/lib/es5/esm/single-spa.min.js")
}
}
}
alias: {
"single-spa": require.resolve("single-spa/lib/es5/esm/single-spa.min.js"),
},
},
};
```

#### Rollup
Expand Down Expand Up @@ -187,22 +187,22 @@ lib

## Async navigation cancelation

We've added support for async navigation cancelation. To use it, call `cancelNavigation(promise)` with a promise as an argument. Single-spa will wait until that promise resolves/rejects before proceeding with navigation. If the promise resolves with a truthy value, navigation is canceled. If the promise resolves with a falsy value or rejects, navigation is not canceled. [Github link](https://github.com/single-spa/single-spa/pull/826)
We've added support for async navigation cancelation. To use it, call `cancelNavigation(promise)` with a promise as an argument. Single-spa will wait until that promise resolves/rejects before proceeding with navigation. If the promise resolves with a truthy value, navigation is canceled. If the promise resolves with a falsy value or rejects, navigation is not canceled. [Github link](https://github.com/single-spa/single-spa/pull/826)

```js
window.addEventListener("single-spa:before-routing-event", evt => {
window.addEventListener("single-spa:before-routing-event", (evt) => {
if (evt.detail.oldUrl === "/settings") {
evt.detail.cancelNavigation(checkSettingsOkay())
evt.detail.cancelNavigation(checkSettingsOkay());
}
})
});

async function checkSettingsOkay() {
const response = await fetch('/api/settings-okay')
const response = await fetch("/api/settings-okay");
if (response.ok) {
return true;
} else {
alert("Please fix your settings before leaving the page");
return false
return false;
}
}
```
Expand All @@ -212,15 +212,15 @@ async function checkSettingsOkay() {
We've exposed a new `patchHistoryApi()` api. This lets you use single-spa's modified implementations of pushState/replaceState/popstate/hashchange without using single-spa applications. This is intended to be used by single-spa users who exclusively use single-spa parcels, rather than applications [Github link](https://github.com/single-spa/single-spa/pull/827)

```js
import { patchHistoryApi, mountRootParcel } from 'single-spa';
import { patchHistoryApi, mountRootParcel } from "single-spa";

patchHistoryApi({
urlRerouteOnly: true
})
urlRerouteOnly: true,
});

// now you don't need to call start() if you're only using parcels

mountRootParcel(parcelConfig, parcelProps)
mountRootParcel(parcelConfig, parcelProps);
```

### New profiler
Expand Down
32 changes: 32 additions & 0 deletions blog/2023-12-12-core-team-meeting-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# December 2023 Core Team Meeting

Attendees: Artur Androsovych, Ian Bacher, Jake Hayes, Milan Kovacic

## Achievements and Progress from November

- Successfully released single-spa version 6, marking a significant milestone in the project's development

## December 2023 Roadmap

1. Update dependencies, and set up automation, starting with create-single-spa
2. Continue work on the consolidation and updates of the example projects

## Meeting Notes

- Welcomed Ian Bacher as a new addition to the core team.
- Reviewed single-spa roadmap

## Initiatives and Goals

- Adding unit tests to existing projects
- SystemJS -> ESM migration
- create-single-spa update (https://github.com/cruft/cruft)
- Release single-spa 6 as latest ✅
- Improve shared dependencies management
- Autopublishes to npm
- Server rendering enhancements?
- Support for NextJS, NuxtJS, Remix, create-react-app, and other build tools
- Consolidate example projects 🚧
- Feature voting
- Automated integration tests for popular frameworks
- Update create-single-spa dependencies 🚧
36 changes: 36 additions & 0 deletions blog/2024-01-03-core-team-meeting-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# January 2024 Core Team Meeting

Attendees: Joel Denning Jake Hayes, Milan Kovacic

## Achievements and Progress from December

- Opened https://github.com/single-spa/create-single-spa/pull/393 to address create-single-spa dependencies

## January 2024 Roadmap

1. Migrate main `single-spa` project to typescript. See [issue 1185](https://github.com/single-spa/single-spa/issues/1185), [PR 1186](https://github.com/single-spa/single-spa/pull/1186) and [PR 1187](https://github.com/single-spa/single-spa/pull/1187).
2. Continue work on the consolidation and updates of the example projects
3. Review https://github.com/single-spa/create-single-spa/pull/393

## Meeting Notes

- Reviewed Typescript pull requests ([PR 1186](https://github.com/single-spa/single-spa/pull/1186) and [PR 1187](https://github.com/single-spa/single-spa/pull/1187))
- Discuss and update roadmap
- Baseplate Cloud update
- Review and comment on https://github.com/single-spa/single-spa/issues/1184
- Review https://github.com/single-spa/single-spa-react/issues/164

## Initiatives and Goals

- Adding unit tests to existing projects
- SystemJS -> ESM migration
- create-single-spa update (https://github.com/cruft/cruft)
- Release single-spa 6 as latest ✅
- Improve shared dependencies management
- Autopublishes to npm
- Server rendering enhancements?
- Support for NextJS, NuxtJS, Remix, create-react-app, and other build tools
- Consolidate example projects 🚧
- Feature voting
- Automated integration tests for popular frameworks
- Update create-single-spa dependencies 🚧
39 changes: 39 additions & 0 deletions blog/2024-02-14-core-team-meeting-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# February 2024 Core Team Meeting

Attendees: Joel Denning, Milan Kovacic, Ian Bacher, Jake Hayes

## Meeting Agenda

- TypeScript migration
- single-spa
- single-spa-react
- Maintenance update
- Baseplate
- Roadmap items
- Blog posts

### TypeScript Migration

1. Single-spa-layout broken types
2. New PR for migration [Single-spa](https://github.com/single-spa/single-spa/pull/1196)

### Review other PR's

1. Examination of an open [PR](https://github.com/single-spa/single-spa/pull/1189) to fix [Issue #1184](https://github.com/single-spa/single-spa/issues/1184)
1. Discussed introducing a new [potential lifecycle hook](https://github.com/single-spa/single-spa/issues/1197)

### Baseplate Pricing Feedback

- Maybe indicate that GB storage is optional. It's possible to bring your own
- "The prices are not ridiculous" - Ian
- "The prices seem reasonable, and the descriptions make sense" - Jake

### Roadmap Items

- Removing default exports
- single-spa-playground was broken due to DNS records, Joel was able to fix that last week
- Look into CORS for single-spa-playground - @Ian will look into

### Blog posts

- Potentially adding Baseplate specific blog posts to single-spa
Loading

0 comments on commit da98569

Please sign in to comment.