Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastboot

Package Overview
Dependencies
Maintainers
7
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastboot - npm Package Compare versions

Comparing version 3.0.0-beta.3 to 3.0.0

14

CHANGELOG.md

@@ -0,1 +1,15 @@

## v3.0.0 (2020-01-31)
#### :boom: Breaking Change
* [#258](https://github.com/ember-fastboot/fastboot/pull/258) Drop Node 8 support ([@rwjblue](https://github.com/rwjblue))
#### :rocket: Enhancement
* [#252](https://github.com/ember-fastboot/fastboot/pull/252) Expose option to allow a new sandbox per visit ([@rwjblue](https://github.com/rwjblue))
#### :house: Internal
* [#259](https://github.com/ember-fastboot/fastboot/pull/259) Update various dependencies to latest versions. ([@rwjblue](https://github.com/rwjblue))
#### Committers: 1
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
## v3.0.0-beta.3 (2019-11-01)

@@ -2,0 +16,0 @@

1

dev/memory-usage.js

@@ -21,2 +21,3 @@ 'use strict';

/* eslint-disable-next-line node/no-unsupported-features/node-builtins */
const inspector = require('inspector');

@@ -23,0 +24,0 @@ const path = require('path');

34

package.json
{
"name": "fastboot",
"version": "3.0.0-beta.3",
"version": "3.0.0",
"description": "Library for rendering Ember apps in node.js",

@@ -28,8 +28,8 @@ "keywords": [

"dependencies": {
"chalk": "^2.4.2",
"chalk": "^3.0.0",
"cookie": "^0.4.0",
"debug": "^4.1.1",
"resolve": "^1.12.0",
"resolve": "^1.15.0",
"simple-dom": "^1.4.0",
"source-map-support": "^0.5.13"
"source-map-support": "^0.5.16"
},

@@ -39,19 +39,19 @@ "devDependencies": {

"chai-as-promised": "^7.1.1",
"eslint": "^6.5.1",
"eslint-config-prettier": "^6.4.0",
"eslint-plugin-chai-expect": "^2.0.1",
"eslint-plugin-mocha": "^6.2.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-chai-expect": "^2.1.0",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"express": "^4.17.1",
"lerna-changelog": "^0.8.2",
"mocha": "^6.2.2",
"prettier": "^1.18.2",
"release-it": "^12.2.1",
"lerna-changelog": "^1.0.0",
"mocha": "^7.0.1",
"prettier": "^1.19.1",
"release-it": "^12.4.3",
"release-it-lerna-changelog": "^1.0.3",
"rimraf": "^3.0.0",
"temp": "^0.9.0"
"rimraf": "^3.0.1",
"temp": "^0.9.1"
},
"engines": {
"node": "^8.10.0 || 10.* || >=12"
"node": "10.* || >=12"
},

@@ -58,0 +58,0 @@ "publishConfig": {

@@ -71,2 +71,3 @@ # FastBoot

- `destroyAppInstanceInMs`: whether to destroy the instance in the given number of ms. This is a failure mechanism to not wedge the Node process
- `buildSandboxPerVisit`: whether to create a new sandbox context per-visit (slows down each visit, but guarantees no prototype leakages can occur), or reuse the existing sandbox (faster per-request, but each request shares the same set of prototypes). Defaults to false.

@@ -73,0 +74,0 @@ ### Build Your App

@@ -186,4 +186,5 @@ 'use strict';

destroy() {
// TODO: expose as public api (through the top level) so that we can
// cleanup pre-warmed visits
if (this._applicationInstance) {
this._applicationInstance.destroy();
}
}

@@ -246,8 +247,23 @@

* @param {Object} result
* @param {Boolean} buildSandboxPerVisit if true, a new sandbox will
* **always** be created, otherwise one
* is created for the first request
* only
* @return {Promise<instance>} instance
*/
async visitRoute(path, fastbootInfo, bootOptions, result) {
let app = await this.buildApp();
result.applicationInstance = app;
async _visit(path, fastbootInfo, bootOptions, result, buildSandboxPerVisit) {
let shouldBuildApp = buildSandboxPerVisit || this._applicationInstance === undefined;
let app = shouldBuildApp ? await this.buildApp() : this._applicationInstance;
if (buildSandboxPerVisit) {
// entangle the specific application instance to the result, so it can be
// destroyed when result._destroy() is called (after the visit is
// completed)
result.applicationInstance = app;
} else {
// save the created application instance so that we can clean it up when
// this instance of `src/ember-app.js` is destroyed (e.g. reload)
this._applicationInstance = app;
}
await app.boot();

@@ -283,2 +299,3 @@

* @param {Integer} [options.destroyAppInstanceInMs] whether to destroy the instance in the given number of ms. This is a failure mechanism to not wedge the Node process (See: https://github.com/ember-fastboot/fastboot/issues/90)
* @param {Boolean} [options.buildSandboxPerVisit] whether to create a new sandbox context per-visit, or reuse the existing sandbox
* @param {ClientRequest}

@@ -320,3 +337,9 @@ * @param {ClientResponse}

try {
await this.visitRoute(path, fastbootInfo, bootOptions, result);
await this._visit(
path,
fastbootInfo,
bootOptions,
result,
options.buildSandboxPerVisit === true
);

@@ -323,0 +346,0 @@ if (!disableShoebox) {

@@ -78,2 +78,3 @@ 'use strict';

* @param {Integer} [options.destroyAppInstanceInMs] whether to destroy the instance in the given number of ms. This is a failure mechanism to not wedge the Node process (See: https://github.com/ember-fastboot/fastboot/issues/90)
* @param {Boolean} [options.buildSandboxPerVisit=false] whether to create a new sandbox context per-visit (slows down each visit, but guarantees no prototype leakages can occur), or reuse the existing sandbox (faster per-request, but each request shares the same set of prototypes)
* @returns {Promise<Result>} result

@@ -80,0 +81,0 @@ */

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc