Skip to content

Commit

Permalink
5.0 (#447)
Browse files Browse the repository at this point in the history
* Adding prettier, speeding up pre-commit, and making clean script cross platform (#391)

* Speeding up pre-commit, and making clean script cross platform

* Adding prettier

* Upgrading nodejs version in Travis (#394)

* (5.0): Remove deprecated lifecycles (#390)

* (5.0) Improving perf with babel/rollup changes (#392)

* Improving perf with babel/rollup changes

* Upgrading travis' node version

* Removing babel-loader

* (5.0): Reducing bundle size by removing class syntax (#393)

* Avoiding classes to save bytes

* Upgrading node version in travis

* (5.0): Various refactors that improve performance (#396)

* Various refactors that improve performance

* Self review

* Self review

* (5.0): Refactoring navigateToUrl to reduce byte size (#395)

* Refactoring navigateToUrl to reduce byte size

* Anthony's feedback

* should be functionally the same as it was before. (#403)

but now with less duplication!

* Switching to error codes for production single-spa (#400)

* Switching to error codes for production single-spa

* Self review

* Self review

* Self review

* Self review

* Self review

* Self review

* Anthony's feedback

* Anthony's feedback

* (5.0): Breaking - remove err.name and err.appName from thrown errors. (#404)

* Switching to error codes for production single-spa

* Self review

* Self review

* Self review

* Self review

* Self review

* Self review

* Anthony's feedback

* Switching from name property to appOrParcelName

* Self review

* Adding support for warningMillis timeout config. Resolves #346. (#389)

* Adding support for warningMillis timeout config. Resolves #346.

* Self review

* Adding more tests, and self review

* Excluding failing tests temporarily

* Linter errors

* Self review

* Tests

* Self review

* Self review

* Fixing tests

* Uncommenting fit

* Updating link to error codes (#406)

* Switching from object rest spread to manual assign. (#401)

* Switching from object rest spread to manual assign.

* More assigns

* Self review

* Prototype pollution

* Self review

* Self review

* Small updates to parcel-related errors (#407)

* Small updates to parcel-related errors

* Self review

* v5.0.0-beta.0

* Adding banner comment to output bundles (#409)

* Adding banner comment to output bundles

* Self review

* Improving description and keywords (#410)

* v5.0.0-beta.1

* Small improvements to error messages (#423)

* Migrating references of CanopyTax org to single-spa

Co-authored-by: Anthony Frehner <frehner@users.noreply.github.com>
  • Loading branch information
joeldenning and frehner committed Feb 23, 2020
1 parent 85f5042 commit 19a8ecd
Show file tree
Hide file tree
Showing 102 changed files with 3,514 additions and 2,010 deletions.
28 changes: 22 additions & 6 deletions .babelrc
@@ -1,18 +1,34 @@
{
"presets": [
["@babel/preset-env", {"modules": false}]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
["@babel/preset-env", {
"modules": false
}]
],
"env": {
"test": {
"presets": [
"@babel/preset-env",
["@babel/preset-env", {
"targets": {
"browsers": "node >=10"
},
}],
],
"plugins": [
"dynamic-import-node"
]
},
"esm": {
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"esmodules": true
}
}
]
]
}
}
}
}
12 changes: 11 additions & 1 deletion .eslintrc
@@ -1,3 +1,13 @@
{
"extends": "canopy"
"extends": [
"canopy",
"important-stuff"
],
"env": {
"browser": true,
"node": true
},
"globals": {
"__DEV__": true
}
}
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/bugs-or-questions.md
@@ -1,10 +1,8 @@
---

name: Bugs or questions
about: Create a report to help us improve

---

**Describe the bug or question**
---**Describe the bug or question**
A clear and concise description of what the bug or question is.

**To Reproduce**
Expand Down
6 changes: 6 additions & 0 deletions .prettierignore
@@ -0,0 +1,6 @@
lib
yarn.lock
LICENSE
.gitignore
.npmignore
.prettierignore
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "8.11.1"
- "node"
script:
- yarn build
- yarn lint
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
@@ -1,3 +1,3 @@
# Code of Conduct

Single-spa has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://single-spa.js.org/docs/code-of-conduct.html) so that you can understand what actions will and will not be tolerated.
Single-spa has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://single-spa.js.org/docs/code-of-conduct.html) so that you can understand what actions will and will not be tolerated.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
@@ -1,5 +1,5 @@
# Contributing to single-spa

Want to contribute to single-spa? There are a few things you need to know.
Want to contribute to single-spa? There are a few things you need to know.

We wrote a **[contribution guide](https://single-spa.js.org/docs/contributing-overview.html)** to help you get started.
5 changes: 3 additions & 2 deletions README.md
@@ -1,9 +1,9 @@

<img src="https://single-spa.js.org/img/logo-white-bgblue.svg" width="50" height="50">

[![npm version](https://img.shields.io/npm/v/single-spa.svg?style=flat-square)](https://www.npmjs.org/package/single-spa)
[![Build Status](https://img.shields.io/travis/single-spa/single-spa/master.svg?style=flat-square)](https://travis-ci.org/single-spa/single-spa)
[![](https://data.jsdelivr.com/v1/package/npm/single-spa/badge)](https://www.jsdelivr.com/package/npm/single-spa)

# single-spa

[Join the chat on Slack](https://join.slack.com/t/single-spa/shared_invite/enQtODAwNTIyMzc4OTE1LWUxMTUwY2M1MTY0ZGMzOTUzMGNkMzI1NzRiYzYwOWM1MTEzZDM1NDAyNWM3ZmViOTAzZThkMDcwMWZmNTFmMWQ)
Expand All @@ -13,14 +13,15 @@
## A javascript framework for front-end microservices

Build micro frontends that coexist and can ([but don't need to](https://single-spa.js.org/docs/faq.html#can-i-use-more-than-one-framework)) be written with their own framework. This allows you to:

- [Use multiple frameworks](/docs/single-spa-ecosystem.md#help-for-frameworks) on the same page [without refreshing the page](/docs/applications.md)
([React](https://github.com/single-spa/single-spa-react), [AngularJS](https://github.com/single-spa/single-spa-angular1), [Angular](https://github.com/single-spa/single-spa-angular2), [Ember](https://github.com/single-spa/single-spa-ember), or whatever you're using)
- Write new code, possibly with a new framework, without rewriting your existing app
- Lazy load code for improved initial load time.

## Documentation

You can find the single-spa documentation [on the website](https://single-spa.js.org/).
You can find the single-spa documentation [on the website](https://single-spa.js.org/).

Check out the [Getting Started](https://single-spa.js.org/docs/getting-started-overview.html) page for a quick overview.

Expand Down
1 change: 0 additions & 1 deletion docs/README.md
@@ -1,4 +1,3 @@
# single-spa documentation

This page has moved. Find the single-spa documentation on the [single-spa website](https://single-spa.js.org/docs/getting-started-overview.html)

2 changes: 1 addition & 1 deletion docs/applications.md
@@ -1,3 +1,3 @@
# Registered applications

This page has moved. Find ["Building Applications"](https://single-spa.js.org/docs/building-applications.html) on the single-spa website.
This page has moved. Find ["Building Applications"](https://single-spa.js.org/docs/building-applications.html) on the single-spa website.
2 changes: 1 addition & 1 deletion docs/migrating-existing-spas.md
@@ -1,3 +1,3 @@
# Migrating existing SPAs

This page has moved. Find ["Migrating existing SPAs"](https://single-spa.js.org/docs/migrating-existing-spas.html) on the single-spa website.
This page has moved. Find ["Migrating existing SPAs"](https://single-spa.js.org/docs/migrating-existing-spas.html) on the single-spa website.
2 changes: 1 addition & 1 deletion docs/parcel-api.md
@@ -1,3 +1,3 @@
# Parcel API

This page has moved. Find the [Single-spa Parcels API](https://single-spa.js.org/docs/parcels-api.html) documentation on the single-spa website.
This page has moved. Find the [Single-spa Parcels API](https://single-spa.js.org/docs/parcels-api.html) documentation on the single-spa website.
2 changes: 1 addition & 1 deletion docs/parcels.md
@@ -1,3 +1,3 @@
# Parcels

This page has moved. Find the [Single-spa Parcels](https://single-spa.js.org/docs/parcels-overview.html) documentation on the single-spa website.
This page has moved. Find the [Single-spa Parcels](https://single-spa.js.org/docs/parcels-overview.html) documentation on the single-spa website.
6 changes: 5 additions & 1 deletion docs/root-application.md
@@ -1,7 +1,11 @@
# Root application

Root application has been renamed to single-spa-config, to make it clear that the root application/single-spa-config is very different from single-spa-applications

## Single-spa-config

[single-spa-config](https://single-spa.js.org/docs/configuration.html)

## Single-spa-applications
[applications](https://single-spa.js.org/docs/building-applications.html)

[applications](https://single-spa.js.org/docs/building-applications.html)
2 changes: 1 addition & 1 deletion docs/separating-applications.md
@@ -1,3 +1,3 @@
# Separating out applications

This page has moved. Find the [Separating Applications](https://single-spa.js.org/docs/separating-applications.html) documentation on the single-spa website.
This page has moved. Find the [Separating Applications](https://single-spa.js.org/docs/separating-applications.html) documentation on the single-spa website.
3 changes: 2 additions & 1 deletion docs/single-spa-api.md
@@ -1,2 +1,3 @@
# single-spa API
This page has moved. Find the [single-spa API](https://single-spa.js.org/docs/api.html) documentation on the single-spa website.

This page has moved. Find the [single-spa API](https://single-spa.js.org/docs/api.html) documentation on the single-spa website.
3 changes: 2 additions & 1 deletion docs/single-spa-config.md
@@ -1,2 +1,3 @@
# Single spa config
This page has moved. Find the [single-spa config](https://single-spa.js.org/docs/configuration.html) documentation on the single-spa website.

This page has moved. Find the [single-spa config](https://single-spa.js.org/docs/configuration.html) documentation on the single-spa website.
2 changes: 1 addition & 1 deletion docs/single-spa-ecosystem.md
@@ -1,3 +1,3 @@
# Single-spa ecosystem

This page has moved. Find the [single-spa ecosystem](https://single-spa.js.org/docs/ecosystem.html) documentation on the single-spa website.
This page has moved. Find the [single-spa ecosystem](https://single-spa.js.org/docs/ecosystem.html) documentation on the single-spa website.
9 changes: 8 additions & 1 deletion examples/README.md
@@ -1,3 +1,10 @@
# Examples

[See list of examples](https://single-spa.js.org/docs/examples).
There are a variety of single-spa example repositories, each for different use cases:

- [single-spa-examples](https://github.com/CanopyTax/single-spa-examples) is where you can find a large example showcasing what single-spa can do. You can also visit the [live demo](http://single-spa.surge.sh) for single-spa-examples.
- [simple-single-spa-webpack-example](https://github.com/joeldenning/simple-single-spa-webpack-example) is a small, simple example that can be used as a webpack starter.
- [single-spa-angular-cli-examples](https://github.com/PlaceMe-SAS/single-spa-angular-cli-examples) is an example of multiple angular apps coexisting in the same single page application. Each uses angular-cli to build a bundle lazily loaded by single-spa.
- [single-spa-es5-angularjs](https://github.com/joeldenning/single-spa-es5-angularjs) is a very tiny es5 example with angularjs.
- # [single-spa-portal-example](https://gitlab.com/TheMcMurder/single-spa-portal-example/) is a complete example with SystemJS, common dependencies, and inter-app communication.
[See list of examples](https://single-spa.js.org/docs/examples).
6 changes: 2 additions & 4 deletions jest.config.json
Expand Up @@ -2,7 +2,5 @@
"moduleNameMapper": {
"single-spa": "<rootDir>/src/single-spa.js"
},
"setupFiles": [
"<rootDir>/spec/test-setup.js"
]
}
"setupFiles": ["<rootDir>/spec/test-setup.js"]
}
21 changes: 14 additions & 7 deletions package.json
@@ -1,25 +1,25 @@
{
"name": "single-spa",
"version": "4.4.3",
"description": "Multiple applications, one page",
"version": "5.0.0-beta.1",
"description": "Microfrontends made easy",
"main": "lib/umd/single-spa.min.js",
"types": "typings/single-spa.d.ts",
"module": "lib/esm/single-spa.min.js",
"scripts": {
"build": "yarn clean && npm run build:prod && npm run build:dev",
"build": "yarn clean && concurrently yarn:build:dev yarn:build:prod",
"build:prod": "rollup -c --environment NODE_ENV:'production'",
"build:dev": "rollup -c",
"build:analyze": "rollup -c --environment ANALYZER:'analyzer'",
"watch": "rollup -c -w",
"prepublishOnly": "yarn build",
"clean": "rm -rf lib",
"clean": "rimraf lib",
"test": "BABEL_ENV=test jest --config jest.config.json",
"test:watch": "BABEL_ENV=test jest --config jest.config.json --watch",
"prettier": "prettier './**' --write",
"lint": "eslint src"
},
"husky": {
"hooks": {
"pre-push": "yarn test && yarn lint"
"pre-commit": "pretty-quick --staged && concurrently yarn:test yarn:lint"
}
},
"files": [
Expand All @@ -30,6 +30,7 @@
"repository": "https://github.com/single-spa/single-spa",
"bugs": "https://github.com/single-spa/single-spa/issues",
"keywords": [
"microfrontends",
"single",
"page",
"application",
Expand All @@ -45,15 +46,21 @@
"@babel/core": "^7.5.5",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.5.5",
"@rollup/plugin-replace": "^2.2.1",
"@types/jest": "^24.0.23",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.4",
"babel-plugin-dynamic-import-node": "^2.3.0",
"concurrently": "^5.0.0",
"custom-event": "^1.0.1",
"eslint": "6.3.0",
"eslint-config-canopy": "2.3.0",
"eslint-config-important-stuff": "^1.1.0",
"husky": "^3.0.5",
"jest": "^24.9.0",
"prettier": "^1.19.1",
"pretty-quick": "^2.0.1",
"rimraf": "^3.0.0",
"rollup": "^1.20.3",
"rollup-plugin-analyzer": "^3.1.2",
"rollup-plugin-babel": "^4.3.3",
Expand Down

0 comments on commit 19a8ecd

Please sign in to comment.