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.8.1 to 0.8.2

18

dist/generate-angular-component.js

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

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

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

.reduce((type, [src, dst]) => {
const renamedType = `I${componentClassName}${type}`;
let renamedType = type;
if (!type.startsWith(prefix)) {
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) => [p1, dst, p2].join('')));
.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('');
}));
}, event.complexType.original

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

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

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

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

.reduce((type, [src, dst]) => {
const renamedType = `I${componentClassName}${type}`;
let renamedType = type;
if (!type.startsWith(prefix)) {
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) => [p1, dst, p2].join('')));
.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('');
}));
}, event.complexType.original

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

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

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

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

.reduce((type, [src, dst]) => {
const renamedType = `I${componentClassName}${type}`;
let renamedType = type;
if (!type.startsWith(prefix)) {
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) => [p1, dst, p2].join('')));
.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('');
}));
}, event.complexType.original

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

2

package.json
{
"name": "@stencil/angular-output-target",
"version": "0.8.1",
"version": "0.8.2",
"description": "Angular output target for @stencil/core components.",

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

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