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

@rollup/plugin-typescript

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rollup/plugin-typescript - npm Package Compare versions

Comparing version 11.1.6 to 12.0.0

29

./dist/cjs/index.js

@@ -411,8 +411,17 @@ 'use strict';

}
let outputDir = outputOptions.dir;
if (outputOptions.file) {
outputDir = path.dirname(outputOptions.file);
}
for (const dirProperty of DIRECTORY_PROPS) {
if (compilerOptions[dirProperty] && outputOptions.dir) {
if (compilerOptions[dirProperty] && outputDir) {
// Checks if the given path lies within Rollup output dir
const fromRollupDirToTs = path.relative(outputOptions.dir, compilerOptions[dirProperty]);
const fromRollupDirToTs = path.relative(outputDir, compilerOptions[dirProperty]);
if (fromRollupDirToTs.startsWith('..')) {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside Rollup 'dir' option.`);
if (outputOptions.dir) {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside Rollup 'dir' option.`);
}
else {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside the same directory as the Rollup 'file' option.`);
}
}

@@ -890,14 +899,4 @@ }

else if (outputOptions.file) {
// find common path of output.file and configured declation output
const outputDir = path__namespace.dirname(outputOptions.file);
const configured = path__namespace.resolve(parsedOptions.options.declarationDir ||
parsedOptions.options.outDir ||
tsconfig ||
process.cwd());
const backwards = path__namespace
.relative(outputDir, configured)
.split(path__namespace.sep)
.filter((v) => v === '..')
.join(path__namespace.sep);
baseDir = path__namespace.normalize(`${outputDir}/${backwards}`);
// the bundle output directory used by rollup when outputOptions.file is used instead of outputOptions.dir
baseDir = path__namespace.dirname(outputOptions.file);
}

@@ -904,0 +903,0 @@ if (!baseDir)

@@ -411,8 +411,17 @@ 'use strict';

}
let outputDir = outputOptions.dir;
if (outputOptions.file) {
outputDir = path.dirname(outputOptions.file);
}
for (const dirProperty of DIRECTORY_PROPS) {
if (compilerOptions[dirProperty] && outputOptions.dir) {
if (compilerOptions[dirProperty] && outputDir) {
// Checks if the given path lies within Rollup output dir
const fromRollupDirToTs = path.relative(outputOptions.dir, compilerOptions[dirProperty]);
const fromRollupDirToTs = path.relative(outputDir, compilerOptions[dirProperty]);
if (fromRollupDirToTs.startsWith('..')) {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside Rollup 'dir' option.`);
if (outputOptions.dir) {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside Rollup 'dir' option.`);
}
else {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside the same directory as the Rollup 'file' option.`);
}
}

@@ -890,14 +899,4 @@ }

else if (outputOptions.file) {
// find common path of output.file and configured declation output
const outputDir = path__namespace.dirname(outputOptions.file);
const configured = path__namespace.resolve(parsedOptions.options.declarationDir ||
parsedOptions.options.outDir ||
tsconfig ||
process.cwd());
const backwards = path__namespace
.relative(outputDir, configured)
.split(path__namespace.sep)
.filter((v) => v === '..')
.join(path__namespace.sep);
baseDir = path__namespace.normalize(`${outputDir}/${backwards}`);
// the bundle output directory used by rollup when outputOptions.file is used instead of outputOptions.dir
baseDir = path__namespace.dirname(outputOptions.file);
}

@@ -904,0 +903,0 @@ if (!baseDir)

@@ -388,8 +388,17 @@ import * as path from 'path';

}
let outputDir = outputOptions.dir;
if (outputOptions.file) {
outputDir = dirname(outputOptions.file);
}
for (const dirProperty of DIRECTORY_PROPS) {
if (compilerOptions[dirProperty] && outputOptions.dir) {
if (compilerOptions[dirProperty] && outputDir) {
// Checks if the given path lies within Rollup output dir
const fromRollupDirToTs = relative(outputOptions.dir, compilerOptions[dirProperty]);
const fromRollupDirToTs = relative(outputDir, compilerOptions[dirProperty]);
if (fromRollupDirToTs.startsWith('..')) {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside Rollup 'dir' option.`);
if (outputOptions.dir) {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside Rollup 'dir' option.`);
}
else {
context.error(`@rollup/plugin-typescript: Path of Typescript compiler option '${dirProperty}' must be located inside the same directory as the Rollup 'file' option.`);
}
}

@@ -867,14 +876,4 @@ }

else if (outputOptions.file) {
// find common path of output.file and configured declation output
const outputDir = path.dirname(outputOptions.file);
const configured = path.resolve(parsedOptions.options.declarationDir ||
parsedOptions.options.outDir ||
tsconfig ||
process.cwd());
const backwards = path
.relative(outputDir, configured)
.split(path.sep)
.filter((v) => v === '..')
.join(path.sep);
baseDir = path.normalize(`${outputDir}/${backwards}`);
// the bundle output directory used by rollup when outputOptions.file is used instead of outputOptions.dir
baseDir = path.dirname(outputOptions.file);
}

@@ -881,0 +880,0 @@ if (!baseDir)

{
"name": "@rollup/plugin-typescript",
"version": "11.1.6",
"version": "12.0.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

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