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

@stencil/angular-output-target

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stencil/angular-output-target - npm Package Compare versions

Comparing version 0.7.2-dev.11691686917.1045ccb9 to 0.8.0

18

dist/generate-angular-component.js

@@ -73,3 +73,2 @@ import { createComponentEventTypeImports, dashToPascalCase, formatToQuotedList } from './utils';

const formatOutputType = (componentClassName, event) => {
const prefix = `I${componentClassName}`;
/**

@@ -83,20 +82,7 @@ * The original attribute contains the original type defined by the devs.

.reduce((type, [src, dst]) => {
let renamedType = type;
if (!type.startsWith(prefix)) {
renamedType = `I${componentClassName}${type}`;
}
const renamedType = `I${componentClassName}${type}`;
return (renamedType
.replace(new RegExp(`^${src}$`, 'g'), `${dst}`)
// Capture all instances of the `src` field surrounded by non-word characters on each side and join them.
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => {
if ((dst === null || dst === void 0 ? void 0 : dst.location) === 'import') {
/**
* Replaces a complex type reference within a generic type.
* For example, remapping a type like `EventEmitter<CustomEvent<MyEvent<T>>>` to
* `EventEmitter<CustomEvent<IMyComponentMyEvent<IMyComponentT>>`.
*/
return [p1, `I${componentClassName}${v.substring(1, v.length - 1)}`, p2].join('');
}
return [p1, dst, p2].join('');
}));
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => [p1, dst, p2].join('')));
}, event.complexType.original

@@ -103,0 +89,0 @@ .replace(/\n/g, ' ')

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

const formatOutputType = (componentClassName, event) => {
const prefix = `I${componentClassName}`;
/**

@@ -228,20 +227,7 @@ * The original attribute contains the original type defined by the devs.

.reduce((type, [src, dst]) => {
let renamedType = type;
if (!type.startsWith(prefix)) {
renamedType = `I${componentClassName}${type}`;
}
const renamedType = `I${componentClassName}${type}`;
return (renamedType
.replace(new RegExp(`^${src}$`, 'g'), `${dst}`)
// Capture all instances of the `src` field surrounded by non-word characters on each side and join them.
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => {
if ((dst === null || dst === void 0 ? void 0 : dst.location) === 'import') {
/**
* Replaces a complex type reference within a generic type.
* For example, remapping a type like `EventEmitter<CustomEvent<MyEvent<T>>>` to
* `EventEmitter<CustomEvent<IMyComponentMyEvent<IMyComponentT>>`.
*/
return [p1, `I${componentClassName}${v.substring(1, v.length - 1)}`, p2].join('');
}
return [p1, dst, p2].join('');
}));
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => [p1, dst, p2].join('')));
}, event.complexType.original

@@ -248,0 +234,0 @@ .replace(/\n/g, ' ')

@@ -210,3 +210,2 @@ import path from 'path';

const formatOutputType = (componentClassName, event) => {
const prefix = `I${componentClassName}`;
/**

@@ -220,20 +219,7 @@ * The original attribute contains the original type defined by the devs.

.reduce((type, [src, dst]) => {
let renamedType = type;
if (!type.startsWith(prefix)) {
renamedType = `I${componentClassName}${type}`;
}
const renamedType = `I${componentClassName}${type}`;
return (renamedType
.replace(new RegExp(`^${src}$`, 'g'), `${dst}`)
// Capture all instances of the `src` field surrounded by non-word characters on each side and join them.
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => {
if ((dst === null || dst === void 0 ? void 0 : dst.location) === 'import') {
/**
* Replaces a complex type reference within a generic type.
* For example, remapping a type like `EventEmitter<CustomEvent<MyEvent<T>>>` to
* `EventEmitter<CustomEvent<IMyComponentMyEvent<IMyComponentT>>`.
*/
return [p1, `I${componentClassName}${v.substring(1, v.length - 1)}`, p2].join('');
}
return [p1, dst, p2].join('');
}));
.replace(new RegExp(`([^\\w])${src}([^\\w])`, 'g'), (v, p1, p2) => [p1, dst, p2].join('')));
}, event.complexType.original

@@ -240,0 +226,0 @@ .replace(/\n/g, ' ')

4

package.json
{
"name": "@stencil/angular-output-target",
"version": "0.7.2-dev.11691686917.1045ccb9",
"version": "0.8.0",
"description": "Angular output target for @stencil/core components.",

@@ -61,3 +61,3 @@ "main": "dist/index.cjs.js",

},
"gitHead": "045ccb908869f12cc45c6f67fb99d1dcf5e23427",
"gitHead": "a3588e905186a0e86e7f88418fd5b2f9531b55e0",
"volta": {

@@ -64,0 +64,0 @@ "extends": "../../package.json"

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