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

@travetto/registry

Package Overview
Dependencies
Maintainers
1
Versions
290
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/registry - npm Package Compare versions

Comparing version 0.0.37 to 0.0.38

2

package.json

@@ -18,3 +18,3 @@ {

"scripts": {},
"version": "0.0.37"
"version": "0.0.38"
}
import { EventEmitter } from 'events';
import { Compiler } from '@travetto/compiler';
import { findAppFilesByExt } from '@travetto/base';
import { findAppFiles } from '@travetto/base';

@@ -77,4 +77,3 @@ import { Class } from '../model/types';

async init() {
const entries = await findAppFilesByExt('.ts')
.filter(x => x.file.includes(`/src/`));
const entries = await findAppFiles('.ts', f => f.includes('/src/'));

@@ -81,0 +80,0 @@ const files = entries

import * as ts from 'typescript';
import * as path from 'path';
import { AppEnv } from '@travetto/base/src/env';
import { TransformUtil, Import, State } from '@travetto/compiler';
const stringHash = require('string-hash');
const SEP = path.sep;
const RE_SEP = SEP === '/' ? '\\/' : SEP;
const SRC_RE = new RegExp(`([^/]+)${RE_SEP}src${RE_SEP}`, 'g');
const PATH_RE = new RegExp(RE_SEP, 'g');
type MethodHashes = { [key: string]: { hash: number, clsId: ts.Identifier } };

@@ -81,11 +77,11 @@

if (fileRoot.includes(process.cwd())) {
fileRoot = file.fileName.split(process.cwd() + SEP)[1];
if (fileRoot.includes(AppEnv.cwd)) {
fileRoot = fileRoot.split(AppEnv.cwd)[1].replace(/^[\\\/]+/, '');
ns = '@app';
if (fileRoot.startsWith(`node_modules${SEP}`)) {
fileRoot = fileRoot.split(`node_modules${SEP}`).pop()!;
if (fileRoot.startsWith('node_modules')) {
fileRoot = fileRoot.split('node_modules').pop()!.replace(/^[\\\/]+/, '');
if (fileRoot.startsWith('@')) {
const [ns1, ns2, ...rest] = fileRoot.split(SEP);
const [ns1, ns2, ...rest] = fileRoot.split(/[\\\/]/);
ns = `${ns1}.${ns2}`;
fileRoot = rest.join(SEP);
fileRoot = rest.join('.');
}

@@ -96,3 +92,3 @@ }

fileRoot = fileRoot
.replace(PATH_RE, '.')
.replace(/[\\\/]+/g, '.')
.replace(/^\./, '')

@@ -99,0 +95,0 @@ .replace(/\.(t|j)s$/, '');

@@ -14,3 +14,3 @@ console.log('Loading');

weight() {
return 33;
return 34;
}

@@ -17,0 +17,0 @@ namered() {

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