Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to monorepo structure (to easily add test apps) #767

Merged
merged 9 commits into from
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Yarn Install
run: yarn install --ignore-engines
- name: Run Mocha Tests
run: yarn test:mocha
run: yarn workspace ember-cli-fastboot test:mocha
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These commands are failing CI, not exactly sure why. Can you run it locally without error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I closed the PR and re opened the PR again and it is now working.

@rwjblue ^^


test-ember:
name: Ember Tests
Expand All @@ -62,5 +62,5 @@ jobs:
- name: Yarn Install
run: yarn install --ignore-engines
- name: Run Tests
run: yarn test:ember
run: yarn workspace ember-cli-fastboot test:ember

19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# How To Contribute


### Code organization

The actual ember addon is in `./packages/ember-cli-fastboot`. We will be adding other `test-packages` to let us test with many different app scenarios with differing dependencies.


### Installation

* `git clone <repository-url>`
* `cd packages/ember-cli-fastboot`
* `yarn install`

## Running tests
* `cd packages/ember-cli-fastboot`
* `yarn test:mocha` – Runs the test suite on the current Ember version
* `yarn test:ember` – Runs the test suite on the current Ember version
* `yarn test:ember --server` – Runs the test suite in "watch mode"
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
The MIT License (MIT)

Copyright (c) 2015-2017
Copyright (c) 2020

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Ember FastBoot

[![Greenkeeper badge](https://badges.greenkeeper.io/ember-fastboot/ember-cli-fastboot.svg)](https://greenkeeper.io/)
[![npm version](https://badge.fury.io/js/ember-cli-fastboot.svg)](https://badge.fury.io/js/ember-cli-fastboot)
[![Build Status](https://travis-ci.org/ember-fastboot/ember-cli-fastboot.svg?branch=master)](https://travis-ci.org/ember-fastboot/ember-cli-fastboot)
[![Build status](https://ci.appveyor.com/api/projects/status/6qcpp4ndy3ao4yv8/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/ember-cli-fastboot/branch/master)
[![Actions Status](hhttps://github.com/ember-fastboot/ember-cli-fastboot/workflows/CI/badge.svg)](https://github.com/ember-fastboot/ember-cli-fastboot/actions)

An Ember CLI addon that allows you to render and serve Ember.js apps on
the server. Using FastBoot, you can serve rendered HTML to browsers and
Expand Down Expand Up @@ -450,7 +448,7 @@ export default class ApplicationAdapter extends JSONAPIAdapter.extend(
```
With this strategy, any time an ember-data `findRecord` request happens while in
Fastboot mode, the record will be put into the shoebox cache and returned. When
subsequent calls are made for that record in the hydrated application, it will
subsequent calls are made for that record in the hydrated application, it will
first check the shoebox data.

#### Solution: Use an Addon (ember-storefront)
Expand Down
114 changes: 5 additions & 109 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,111 +1,7 @@

{
"name": "ember-cli-fastboot",
"version": "2.2.3",
"description": "Server-side rendering for Ember.js apps",
"keywords": [
"ember-addon"
],
"repository": "https://github.com/ember-fastboot/ember-cli-fastboot",
"license": "MIT",
"author": "Tom Dale & Yehuda Katz <[email protected]>",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"release": "release-it",
"start": "ember serve",
"test": "mocha && ember test",
"test:mocha": "mocha",
"test:ember": "ember test",
"test:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js"
},
"dependencies": {
"broccoli-concat": "^3.7.1",
"broccoli-file-creator": "^2.1.1",
"broccoli-funnel": "^2.0.1",
"broccoli-merge-trees": "^3.0.1",
"broccoli-plugin": "^1.3.1",
"chalk": "^2.4.1",
"ember-cli-babel": "^7.1.0",
"ember-cli-lodash-subset": "2.0.1",
"ember-cli-preprocess-registry": "^3.1.2",
"ember-cli-version-checker": "^3.0.0",
"fastboot": "^3.0.0",
"fastboot-express-middleware": "^2.0.0",
"fastboot-transform": "^0.1.3",
"fs-extra": "^7.0.0",
"json-stable-stringify": "^1.0.1",
"md5-hex": "^2.0.0",
"silent-error": "^1.1.0"
},
"devDependencies": {
"body-parser": "^1.18.3",
"broccoli-asset-rev": "^3.0.0",
"broccoli-test-helper": "^1.5.0",
"chai": "^4.1.2",
"chai-fs": "^2.0.0",
"chai-string": "^1.4.0",
"co": "^4.6.0",
"ember-ajax": "^3.1.0",
"ember-cli": "~3.3.0",
"ember-cli-addon-tests": "^0.11.1",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-eslint": "^4.2.3",
"ember-cli-htmlbars": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-qunit": "^4.3.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-uglify": "^2.1.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.1.0",
"ember-maybe-import-regenerator-for-testing": "^1.0.0",
"ember-resolver": "^5.0.1",
"ember-sinon": "^2.2.0",
"ember-source": "~3.8.0",
"eslint-plugin-ember": "^7.0.0",
"eslint-plugin-node": "^7.0.1",
"glob": "^7.1.3",
"loader.js": "^4.7.0",
"mocha": "^5.2.0",
"qunit-dom": "^0.8.0",
"release-it": "^12.0.1",
"release-it-lerna-changelog": "^1.0.2",
"request": "^2.88.0",
"rsvp": "^4.8.3"
},
"engines": {
"node": "10.* || 12.* || >= 14.*"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"ember-addon": {
"configPath": "tests/dummy/config",
"before": [
"broccoli-serve-files"
]
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md"
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true
}
},
"volta": {
"node": "12.18.2",
"yarn": "1.17.3"
}
"private": true,
"workspaces": [
"packages/ember-cli-fastboot"
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
111 changes: 111 additions & 0 deletions packages/ember-cli-fastboot/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"name": "ember-cli-fastboot",
"version": "2.2.3",
"description": "Server-side rendering for Ember.js apps",
"keywords": [
"ember-addon"
],
"repository": "https://github.com/ember-fastboot/ember-cli-fastboot",
"license": "MIT",
"author": "Tom Dale & Yehuda Katz <[email protected]>",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:js": "eslint ./*.js addon addon-test-support app config lib server test-support tests",
"release": "release-it",
"start": "ember serve",
"test": "mocha && ember test",
"test:mocha": "mocha",
"test:ember": "ember test",
"test:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js"
},
"dependencies": {
"broccoli-concat": "^3.7.1",
"broccoli-file-creator": "^2.1.1",
"broccoli-funnel": "^2.0.1",
"broccoli-merge-trees": "^3.0.1",
"broccoli-plugin": "^1.3.1",
"chalk": "^2.4.1",
"ember-cli-babel": "^7.1.0",
"ember-cli-lodash-subset": "2.0.1",
"ember-cli-preprocess-registry": "^3.1.2",
"ember-cli-version-checker": "^3.0.0",
"fastboot": "^3.0.0",
"fastboot-express-middleware": "^2.0.0",
"fastboot-transform": "^0.1.3",
"fs-extra": "^7.0.0",
"json-stable-stringify": "^1.0.1",
"md5-hex": "^2.0.0",
"silent-error": "^1.1.0"
},
"devDependencies": {
"body-parser": "^1.18.3",
"broccoli-asset-rev": "^3.0.0",
"broccoli-test-helper": "^1.5.0",
"chai": "^4.1.2",
"chai-fs": "^2.0.0",
"chai-string": "^1.4.0",
"co": "^4.6.0",
"ember-ajax": "^3.1.0",
"ember-cli": "~3.3.0",
"ember-cli-addon-tests": "^0.11.1",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-eslint": "^4.2.3",
"ember-cli-htmlbars": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-qunit": "^4.3.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-uglify": "^2.1.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.1.0",
"ember-maybe-import-regenerator-for-testing": "^1.0.0",
"ember-resolver": "^5.0.1",
"ember-sinon": "^2.2.0",
"ember-source": "~3.8.0",
"eslint-plugin-ember": "^7.0.0",
"eslint-plugin-node": "^7.0.1",
"glob": "^7.1.3",
"loader.js": "^4.7.0",
"mocha": "^5.2.0",
"qunit-dom": "^0.8.0",
"release-it": "^12.0.1",
"release-it-lerna-changelog": "^1.0.2",
"request": "^2.88.0",
"rsvp": "^4.8.3"
},
"engines": {
"node": "10.* || 12.* || >= 14.*"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"ember-addon": {
"configPath": "tests/dummy/config",
"before": [
"broccoli-serve-files"
]
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md"
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true
}
},
Comment on lines +94 to +106
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to tweak this too, I'll do that in a follow up.

"volta": {
"node": "12.18.2",
"yarn": "1.17.3"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.