New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react2amp

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react2amp - npm Package Compare versions

Comparing version 1.18.2 to 1.18.3

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## <small>1.18.3 (2019-10-26)</small>
* docs: update readme ([2911650](https://github.com/danhuang1202/react2amp/commit/2911650))
* fix: cache css ([04a49a0](https://github.com/danhuang1202/react2amp/commit/04a49a0))
## <small>1.18.2 (2019-10-26)</small>

@@ -2,0 +7,0 @@

16

lib/plugins/index.js

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

this.ampComponentMap = {};
this.cssMap = {};
}

@@ -259,2 +260,3 @@

_this.ampComponentMap = {};
_this.cssMap = {};
var result = {};

@@ -499,2 +501,3 @@ var javascriptRegex = /\.(js|mjs)(\?|$)/;

var result = '';
var _iteratorNormalCompletion4 = true;

@@ -514,3 +517,12 @@ var _didIteratorError4 = false;

css += module.content.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g, '').replace(/\r?\n/g, '');
var context = module.context,
content = module.content;
if (this.cssMap[context]) {
result += this.cssMap[context];
} else {
var newCss = content.replace(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//g, '').replace(/\r?\n/g, '');
this.cssMap[context] = newCss;
result += newCss;
}
}

@@ -532,3 +544,3 @@ } catch (err) {

return css;
return css + result;
}

@@ -535,0 +547,0 @@ }]);

2

package.json
{
"name": "react2amp",
"version": "1.18.2",
"version": "1.18.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -106,3 +106,4 @@ # react2amp

| includeEntries | string[] | false | [] | Only collect assets from the entries inside `includeEntries` |
| excludeResourcesRegExp | RegExp | false | - | Ignore the module resources match the `excludeResourcesRegExp` rules |
| excludeJsResourcesRegExp | RegExp | false | - | Ignore the module resources match the `excludeJsResourcesRegExp` rules when finding AMP components |
| excludeCssResourcesRegExp | RegExp | false | - | Ignore the module resources match the `excludeCssResourcesRegExp` rules when finding css |

@@ -109,0 +110,0 @@ usage:

@@ -22,2 +22,3 @@ declare type FileName = string;

private ampComponentMap;
private cssMap;
constructor(options: Options);

@@ -24,0 +25,0 @@ apply(compiler: any): void;

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