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

reboost

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reboost - npm Package Compare versions

Comparing version 0.18.1 to 0.18.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 0.18.2
- Fixed issue with CommonJS interop mode 1
- Added [`LitCSSPlugin`](/packages/plugin-litcss/README.md)
## 0.18.1

@@ -2,0 +6,0 @@ - Update Hot Reload API

20

dist/node/core-plugins/commonjs-mode-1/transform-commonjs.js

@@ -22,2 +22,6 @@ "use strict";

program = path;
if (path.scope.hasGlobal('module'))
usedModuleExports = true;
if (path.scope.hasGlobal('exports'))
usedExports = true;
},

@@ -87,16 +91,2 @@ ImportDeclaration(path) {

},
MemberExpression(path) {
if (!usedModuleExports &&
t.isIdentifier(path.node.object, { name: 'module' }) &&
(path.node.computed
? t.isStringLiteral(path.node.property, { value: 'exports' })
: t.isIdentifier(path.node.property, { name: 'exports' }))) {
if (!path.scope.hasBinding('module'))
usedModuleExports = true;
}
else if (!usedExports && t.isIdentifier(path.node.object, { name: 'exports' })) {
if (!path.scope.hasBinding('exports'))
usedExports = true;
}
}
});

@@ -116,3 +106,3 @@ if (usedModuleExports || usedExports) {

}
program.node.body.push(t.exportNamedDeclaration(t.variableDeclaration('const', [
program.node.body.push(t.exportNamedDeclaration(t.variableDeclaration('var', [
t.variableDeclarator(t.identifier('__cjsExports'), usedModuleExports

@@ -119,0 +109,0 @@ ? t.memberExpression(t.identifier('module'), t.identifier('exports'))

@@ -26,4 +26,2 @@ "use strict";

resolve(importedPath, importer) {
if (importedPath.startsWith('/'))
return importedPath;
const key = `${importer} -> ${importedPath}`;

@@ -30,0 +28,0 @@ if (cacheMap.has(key)) {

@@ -115,3 +115,3 @@ "use strict";

fs_1.default.writeFileSync(cacheFilePath, transformedCode);
cacheInfo.hash = hash;
cacheInfo.hash = hash || await md5_file_1.default(filePath);
cacheInfo.mtime = mtime;

@@ -118,0 +118,0 @@ cacheInfo.plugins = currentPlugins;

@@ -151,3 +151,3 @@ "use strict";

hot.self.accept((...args) => updateListeners.forEach((cb) => cb(...args)));
hot.accept((...args) => updateListeners.forEach((cb) => cb(...args)));
}

@@ -154,0 +154,0 @@

@@ -19,2 +19,4 @@ "use strict";

};
const isPathRouted = (path) => path.startsWith('#/');
const pathFromRouted = (path) => path.substring(1);
exports.resolveImports = async (instance, ast, filePath) => {

@@ -37,4 +39,4 @@ let error = false;

let routed = false;
if (source.startsWith('#/')) {
finalPath = source.substring(1);
if (isPathRouted(source)) {
finalPath = pathFromRouted(source);
routed = true;

@@ -45,4 +47,4 @@ }

if (resolvedPath) {
if (resolvedPath.startsWith('#/')) {
finalPath = resolvedPath.substring(1);
if (isPathRouted(resolvedPath)) {
finalPath = pathFromRouted(resolvedPath);
routed = true;

@@ -84,3 +86,12 @@ }

promiseExecutors.push(async () => {
nodePath.replaceWith(t.stringLiteral(await exports.resolveDependency(instance, nodePath.node.arguments[0].value, filePath)));
const toResolve = nodePath.node.arguments[0].value;
if (isPathRouted(toResolve)) {
nodePath.replaceWith(t.stringLiteral(pathFromRouted(toResolve)));
}
else {
const resolvedPath = await exports.resolveDependency(instance, toResolve, filePath);
if (resolvedPath) {
nodePath.replaceWith(t.stringLiteral(resolvedPath));
}
}
});

@@ -87,0 +98,0 @@ }

{
"name": "reboost",
"version": "0.18.1",
"version": "0.18.2",
"description": "A super fast dev server for rapid web development",

@@ -90,3 +90,3 @@ "main": "./dist/node/index.js",

},
"gitHead": "80dc6186e84a9dbd9979d7b376765614089dec6a"
"gitHead": "88aec76fffff0c70740609c6b01245e88d1a62fc"
}

@@ -27,2 +27,22 @@ <p align="center">

## Features
- *No bundling*. So the server start time is *fast*.
- Transforms only the *required/changed files*.
- Uses advanced filesystem cache. It will stay fast even after restarting.
- Complete source maps support for better developer experience.
- Supports *CommonJS modules*.
- Plugin API for extending its capability.
- Enhanced import resolving.
- Built-in Hot Reload API.
- Out of the box support for JSON, CSS Modules, JSX, and TypeScript.
- Preprocessor support using Plugin.
- Combine with any other server.
- Built-in content server with live reload and hot reload for CSS.
- Lots of configurable options.
#### *NOTE*
**Experimental**: Reboost is in early development, and some things may change/break before we hit version 1.0.\
**Only for development build**: Reboost is intended to use only on development, for production you've to
bundle up your files by yourself using bundlers like Webpack, Rollup, etc.
## Quickstart

@@ -44,7 +64,2 @@ Run this command in your terminal

#### *NOTE*
**Experimental**: Reboost is in early development, and some things may change/break before we hit version 1.0.\
**Only for development build**: Reboost is intended to use only on development, for production you've to
bundle up your files by yourself using bundlers like Webpack, Rollup, etc.
## Docs

@@ -57,18 +72,4 @@ [Changelog](/packages/core/CHANGELOG.md)\

[Recipes](/docs/recipes.md)\
[FAQs/Troubleshooting](/docs/faqs-and-troubleshooting.md)\
[Supporting old browsers while using `script type="module"`](/docs/supporting-old-browsers.md)
[FAQs/Troubleshooting](/docs/faqs-and-troubleshooting.md)
## Features
- **No bundling**. So the server start time is *fast*.
- Transforms only the **required/changed files**.
- Uses advanced **filesystem cache**. It will stay fast even after restarting.
- Complete source maps support for better developer experience.
- Supports **CommonJS modules**.
- Plugin API for extending its capability.
- Enhanced import resolving.
- Built-in Hot Reload API.
- Out of the box support for JSON, CSS Modules, JSX, and TypeScript.
- Preprocessor support using Plugin.
- **Works with [Electron](https://www.electronjs.org/)** (client side).
## What are supported

@@ -75,0 +76,0 @@ - ES Modules

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