alloy-compiler
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.1.1](https://github.com/appcelerator/alloy-devkit/compare/v0.1.0...v0.1.1) (2020-01-24) | ||
### Bug Fixes | ||
* **compiler:** look up correct platform during optimization ([70d0cdc](https://github.com/appcelerator/alloy-devkit/commit/70d0cdcf922d28c956eca83e601223e20cb9ab3c)) | ||
# 0.1.0 (2020-01-24) | ||
@@ -8,0 +19,0 @@ |
@@ -1,6 +0,5 @@ | ||
var CONST = require('alloy-utils').constants, | ||
_ = require('lodash'), | ||
path = require('path'), | ||
fs = require('fs'); | ||
var _ = require('lodash'); | ||
const { constants: CONST, platforms } = require('alloy-utils'); | ||
// Walk tree transformer changing (Ti|Titanium).Platform.(osname|name) | ||
@@ -34,10 +33,9 @@ // into static strings where possible. This will allow the following | ||
// make sure the platform require includes | ||
var platformString = config.platform.toLowerCase(); | ||
var platformPath = path.join(__dirname, '..', '..', '..', '..', 'platforms', platformString, 'index'); | ||
if (!fs.existsSync(platformPath + '.js')) { | ||
var platformName = config.platform.toLowerCase(); | ||
if (!platforms[platformName]) { | ||
this.platform = { name: undefined, osname: undefined }; | ||
} else { | ||
// create, transform, and validate the platform object | ||
// eslint-disable-next-line security/detect-non-literal-require | ||
this.platform = require(platformPath); | ||
this.platform = platforms[platformName]; | ||
if (!_.isString(this.platform.name)) { | ||
@@ -44,0 +42,0 @@ this.platform.name = undefined; |
{ | ||
"name": "alloy-compiler", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Compiler for Alloy components", | ||
@@ -12,2 +12,7 @@ "main": "lib/index.js", | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/appcelerator/alloy-devkit/tree/develop/packages/alloy-compiler#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/appcelerator/alloy-devkit.git" | ||
}, | ||
"dependencies": { | ||
@@ -18,3 +23,3 @@ "@babel/generator": "^7.8.3", | ||
"@babel/types": "^7.8.3", | ||
"alloy-utils": "^0.1.0", | ||
"alloy-utils": "^0.1.1", | ||
"chmodr": "^1.2.0", | ||
@@ -31,3 +36,3 @@ "fs-extra": "^8.1.0", | ||
}, | ||
"gitHead": "8d1ddd7d8718855ec34b0ccc4bc45b756678f950" | ||
"gitHead": "611408f2a367e5e134f3f6d0275255ae24f3e143" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
918448
272
23751
1
16
Updatedalloy-utils@^0.1.1