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

embedded-ts

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embedded-ts - npm Package Compare versions

Comparing version 0.3.2 to 0.3.4

index.d.cts

2

bin/cli.js

@@ -0,3 +1,3 @@

import * as fs from 'node:fs';
import { program } from 'commander';
import * as fs from 'node:fs';
import { renderFile } from '../utils/ets.js';

@@ -4,0 +4,0 @@ program

{
"name": "embedded-ts",
"version": "0.3.2",
"type": "module",
"version": "0.3.4",
"description": "Embedded TypeScript.",
"license": "MIT",
"bin": {
"ets": "./bin/cli.js"
"author": {
"name": "Leon Si",
"email": "contact@leonzalion.com",
"url": "https://leonzalion.com"
},

@@ -13,35 +16,36 @@ "repository": {

},
"homepage": "https://github.com/leonzalion/ets#readme",
"author": {
"name": "Leon Si",
"email": "contact@leonzalion.com",
"url": "https://leonzalion.com"
},
"type": "module",
"exports": {
"import": "./index.js",
"require": "./index.cjs"
"import": {
"types": "./index.d.ts",
"default": "./index.js"
},
"require": {
"types": "./index.d.cts",
"default": "./index.cjs"
}
},
"devDependencies": {
"@leonzalion/configs": "^1.2.33",
"@types/lru-cache": "^7.6.1",
"@types/node": "^17.0.31",
"@types/xml-escape": "^1.1.0",
"desm": "^1.2.0",
"eslint-define-config": "^1.4.0",
"execa": "^6.1.0",
"lion-system": "^1.3.25",
"tslib": "^2.4.0",
"typescript": "^4.6.4",
"vitest": "^0.10.0"
"bin": {
"ets": "./bin/cli.js"
},
"homepage": "https://github.com/leonzalion/ets#readme",
"dependencies": {
"change-case": "^4.1.2",
"commander": "^9.2.0",
"esbuild": "^0.14.38",
"commander": "^9.4.1",
"esbuild": "^0.15.11",
"escape-string-regexp": "^5.0.0",
"lru-cache": "^7.9.0",
"lru-cache": "^7.14.0",
"outdent": "^0.8.0",
"xml-escape": "^1.1.0"
},
"devDependencies": {
"@types/node": "^18.8.5",
"@types/xml-escape": "^1.1.1",
"desm": "^1.3.0",
"eslint-define-config": "^1.7.0",
"execa": "^6.1.0",
"lionconfig": "^1.8.11",
"tslib": "^2.4.0",
"typescript": "^4.8.4",
"vitest": "^0.24.3"
},
"publishConfig": {

@@ -52,9 +56,9 @@ "directory": "dist"

"release": "lionp",
"build": "node-ts ./scripts/build.ts",
"start": "node-ts ./src/index.ts",
"build": "node-ts ./scripts/build.js",
"start": "node-ts ./src/index.js",
"test": "vitest run",
"lint": "eslint --cache --fix .",
"prettier": "prettier --write .",
"tc": "tsc --noEmit"
"typecheck": "tsc --noEmit"
}
}

@@ -30,3 +30,3 @@ export declare type RenderFileCallback<T> = (err: Error | null, str: string) => T;

export declare type EscapeCallback = (markup?: any) => string;
declare type RethrowProps = {
interface RethrowProps {
error: Error;

@@ -37,3 +37,3 @@ source: string;

escape: EscapeCallback;
};
}
/**

@@ -40,0 +40,0 @@ * This type of callback is used when `Options.compileDebug`

@@ -1,2 +0,2 @@

import type { ETSOptions, TemplateFunction } from '../types.js';
import type { ETSOptions, TemplateFunction } from '~/types.js';
/**

@@ -3,0 +3,0 @@ * Get the path to the included file from the parent file path and the

@@ -143,3 +143,3 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {

const fs = await import('node:fs');
template = await fs.promises.readFile(filename, 'utf-8');
template = await fs.promises.readFile(filename, 'utf8');
template = template.replace(BOM, '');

@@ -174,10 +174,8 @@ }

const includerResult = await options.includer(filePath, opts.filename);
if (includerResult) {
if (includerResult.filename) {
opts.filename = includerResult.filename;
}
if (includerResult.template) {
return handleCache(opts, includerResult.template);
}
if (includerResult.filename) {
opts.filename = includerResult.filename;
}
if (includerResult.template) {
return handleCache(opts, includerResult.template);
}
}

@@ -207,3 +205,3 @@ const templateRenderFunction = await handleCache(opts);

error.message = outdent `
${filename ?? 'ets'}:${lineno}
${filename === '' ? 'ets' : filename}:${lineno}
${context}

@@ -354,6 +352,4 @@

this.generateSource();
if (options.importResolver !== undefined) {
// Transform all dynamic imports from `import(...)` to `import(__importResolver(...))`
this.source = this.source.replace(/import\(([\s\S]*?)\)/g, 'import(__importResolver($1))');
}
// Transform all dynamic imports from `import(...)` to `import(__importResolver(...))`
this.source = this.source.replace(/import\(([\s\S]*?)\)/g, 'import(__importResolver($1))');
let code;

@@ -360,0 +356,0 @@ if (options.transform === undefined) {

Sorry, the diff of this file is not supported yet

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