Socket
Socket
Sign inDemoInstall

ui5-tooling-transpile

Package Overview
Dependencies
180
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.0.2

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [3.0.2](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/ui5-tooling-transpile@3.0.1...ui5-tooling-transpile@3.0.2) (2023-08-09)
### Bug Fixes
* **ui5-tooling-transpile:** derive transpileDependencies from tsconfig ([#786](https://github.com/ui5-community/ui5-ecosystem-showcase/issues/786)) ([ba5d734](https://github.com/ui5-community/ui5-ecosystem-showcase/commit/ba5d734bd6772a6c4b05344ec7f69b4d1de4a1ea))
## [3.0.1](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/ui5-tooling-transpile@3.0.0...ui5-tooling-transpile@3.0.1) (2023-08-01)

@@ -8,0 +19,0 @@

23

lib/util.js

@@ -81,4 +81,25 @@ const os = require("os");

// if a tsconfig.json file exists, the project is a TypeScript project
const isTypeScriptProject = fs.existsSync(path.join(cwd, "tsconfig.json"));
const tscJsonPath = path.join(cwd, "tsconfig.json");
const isTypeScriptProject = fs.existsSync(tscJsonPath);
// read package.json and tsconfig.json to determine whether to transpile dependencies or not
if (isTypeScriptProject && !config.transpileDependencies) {
const tscJson = JSON.parse(fs.readFileSync(tscJsonPath, { encoding: "utf8" }));
const tsDeps = tscJson?.compilerOptions?.types?.filter((typePkgName) => {
try {
// if a type dependency includes a ui5.yaml we assume
// to support transpiling of dependencies - and in case
// of the project is built already the js files are
// available and can be served directly without transpile
const ui5YamlPath = require.resolve(`${typePkgName}/ui5.yaml`, {
paths: [cwd]
});
return !!ui5YamlPath;
} catch (e) {
return false;
}
});
config.transpileDependencies = tsDeps?.length || 0 > 0;
}
// derive whether TypeScript should be transformed or not

@@ -85,0 +106,0 @@ const transformTypeScript = config.transformTypeScript ?? config.transpileTypeScript ?? isTypeScriptProject;

4

package.json
{
"name": "ui5-tooling-transpile",
"version": "3.0.1",
"version": "3.0.2",
"description": "UI5 tooling extensions to transpile code",

@@ -37,3 +37,3 @@ "author": "Jorge Martins, Peter Muessig",

},
"gitHead": "648744879c475e77319f84dfe8f14509bdd4a667"
"gitHead": "b8fc3f2142f4b1cedfe7767ab0b55aa0a9ef7aaa"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc