@lightningjs/cli
Advanced tools
Comparing version 2.11.0 to 2.12.0
@@ -155,3 +155,3 @@ #!/usr/bin/env node | ||
const defaultTypes = ['es6'] | ||
const defaultTypes = ['defaults'] | ||
const isWatchEnabled = input.watch ? input.watch : false | ||
@@ -158,0 +158,0 @@ delete input.watch |
# Changelog | ||
## v2.12.0 | ||
*27 jul 2023* | ||
- Fixed issue with rollup typescript project throwing error when accessing process env ([#235](https://github.com/rdkcentral/Lightning-CLI/issues/235)) | ||
- Added "include" config in tsconfig.json for lng create command | ||
- Added support for getting "esEnv" from settings.json file for lng dist ([#224](https://github.com/rdkcentral/Lightning-CLI/issues/224)) | ||
- Added support for transpiling .mjs files to ES5 with rollup | ||
- Fixed the issue related to Babel ignore is not possible to use in a babel.config.json ([#177](https://github.com/rdkcentral/Lightning-CLI/issues/177)) | ||
## v2.11.0 | ||
@@ -4,0 +14,0 @@ |
@@ -10,3 +10,4 @@ { | ||
"noImplicitOverride": true | ||
} | ||
}, | ||
"include": ["src/**/*.ts"] | ||
} |
@@ -5,3 +5,3 @@ { | ||
"name": "@lightningjs/cli", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"description": "Lightning-CLI: Command Line Interface tool for a seamless Lightning App Development flow", | ||
@@ -41,2 +41,3 @@ "bin": { | ||
"@rollup/plugin-virtual": "^2.0.3", | ||
"@rollup/plugin-typescript": "^11.1.1", | ||
"babel-plugin-inline-json-import": "^0.3.2", | ||
@@ -43,0 +44,0 @@ "chalk": "^4.1.0", |
@@ -31,3 +31,9 @@ /* | ||
let metadata | ||
let settingsFileName = buildHelpers.getSettingsFileName() | ||
let settings | ||
const buildES = (type, esEnv) => { | ||
return !!(type || esEnv) | ||
} | ||
const dist = (type, config) => { | ||
@@ -40,2 +46,9 @@ let distDir | ||
() => buildHelpers.readMetadata().then(result => (metadata = result)), | ||
() => buildHelpers.readSettings(settingsFileName).then(result => (settings = result)), | ||
() => | ||
(type = !type.includes('defaults') | ||
? type | ||
: settings.platformSettings.esEnv | ||
? settings.platformSettings.esEnv | ||
: 'es6'), | ||
() => { | ||
@@ -58,5 +71,7 @@ distDir = path.join(baseDistDir, type) | ||
type === 'es6' && | ||
buildES('es6', settings.platformSettings.esEnv) && | ||
buildHelpers.bundleEs6App(path.join(distDir, 'js'), metadata, { sourcemaps: false }), | ||
() => | ||
type === 'es5' && | ||
buildES('es5', settings.platformSettings.esEnv) && | ||
buildHelpers.bundleEs5App(path.join(distDir, 'js'), metadata, { sourcemaps: false }), | ||
@@ -63,0 +78,0 @@ () => type === 'es5' && buildHelpers.bundlePolyfills(path.join(distDir, 'js')), |
@@ -22,2 +22,3 @@ /* | ||
const process = require('process') | ||
const fs = require('fs') | ||
const babel = require('@rollup/plugin-babel').babel | ||
@@ -36,2 +37,3 @@ const resolve = require('@rollup/plugin-node-resolve').nodeResolve | ||
const image = require('@rollup/plugin-image') | ||
const typescript = require('@rollup/plugin-typescript') | ||
const buildHelpers = require(path.join(__dirname, '../helpers/build')) | ||
@@ -41,3 +43,3 @@ const minify = require('rollup-plugin-terser').terser | ||
const os = require('os') | ||
const extensions = ['.js', '.ts'] | ||
const extensions = ['.js', '.ts', '.mjs'] | ||
@@ -53,2 +55,3 @@ module.exports = { | ||
image(), | ||
fs.existsSync(path.join(process.cwd(), 'tsconfig.json')) && typescript(), | ||
inject({ | ||
@@ -55,0 +58,0 @@ 'process.env': 'processEnv', |
@@ -22,2 +22,3 @@ /* | ||
const process = require('process') | ||
const fs = require('fs') | ||
const babel = require('@rollup/plugin-babel').babel | ||
@@ -34,2 +35,3 @@ const babelPluginClassProperties = require('@babel/plugin-proposal-class-properties') | ||
const image = require('@rollup/plugin-image') | ||
const typescript = require('@rollup/plugin-typescript') | ||
const buildHelpers = require(path.join(__dirname, '../helpers/build')) | ||
@@ -50,2 +52,3 @@ const minify = require('rollup-plugin-terser').terser | ||
image(), | ||
fs.existsSync(path.join(process.cwd(), 'tsconfig.json')) && typescript(), | ||
inject({ | ||
@@ -52,0 +55,0 @@ 'process.env': 'processEnv', |
@@ -44,2 +44,6 @@ /* | ||
if(!babelOptions) { | ||
return | ||
} | ||
if (babelOptions.sourceMaps) { | ||
@@ -61,2 +65,5 @@ const filename = path.relative(process.cwd(), args.path) | ||
build.onLoad({ filter, namespace }, async args => { | ||
if (/util.inspect/.test(args.path)) { | ||
args.path += '.js' | ||
} | ||
const contents = await fs.promises.readFile(args.path, 'utf8') | ||
@@ -63,0 +70,0 @@ |
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
825169
2814
38
93
+ Added@rollup/plugin-typescript@11.1.6(transitive)
+ Added@rollup/pluginutils@5.1.4(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Addedpicomatch@4.0.2(transitive)
+ Addedtypescript@5.7.3(transitive)