Skip to content

Commit

Permalink
Release 17.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benm071 committed Nov 4, 2024
1 parent 3345ab2 commit 0e8e251
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 75 deletions.
68 changes: 34 additions & 34 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
Copyright (c) 2024 Oracle and/or its affiliates.
The Universal Permissive License (UPL), Version 1.0
Subject to the condition set forth below, permission is hereby granted to any
person obtaining a copy of this software, associated documentation and/or data
(collectively the "Software"), free of charge and under any and all copyright
rights in the Software, and any and all patent rights owned or freely
licensable by each licensor hereunder covering either (i) the unmodified
Software as contributed to or provided by such licensor, or (ii) the Larger
Works (as defined below), to deal in both
(a) the Software, and
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
one is included with the Software (each a "Larger Work" to which the Software
is contributed by such licensors),
without restriction, including without limitation the rights to copy, create
derivative works of, display, perform, and distribute the Software and make,
use, sell, offer for sale, import, export, have made, and have sold the
Software and the Larger Work(s), and to sublicense the foregoing rights on
either these or other terms.
This license is subject to the following condition:
The above copyright notice and either this complete permission notice or at
a minimum a reference to the UPL must be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
Copyright (c) 2024 Oracle and/or its affiliates.

The Universal Permissive License (UPL), Version 1.0

Subject to the condition set forth below, permission is hereby granted to any
person obtaining a copy of this software, associated documentation and/or data
(collectively the "Software"), free of charge and under any and all copyright
rights in the Software, and any and all patent rights owned or freely
licensable by each licensor hereunder covering either (i) the unmodified
Software as contributed to or provided by such licensor, or (ii) the Larger
Works (as defined below), to deal in both

(a) the Software, and
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
one is included with the Software (each a "Larger Work" to which the Software
is contributed by such licensors),

without restriction, including without limitation the rights to copy, create
derivative works of, display, perform, and distribute the Software and make,
use, sell, offer for sale, import, export, have made, and have sold the
Software and the Larger Work(s), and to sublicense the foregoing rights on
either these or other terms.

This license is subject to the following condition:
The above copyright notice and either this complete permission notice or at
a minimum a reference to the UPL must be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# @oracle/oraclejet-tooling 17.0.0
# @oracle/oraclejet-tooling 17.1.0

## About the tooling API
This tooling API contains methods to build and serve Oracle JET web apps. It is intended to be used with task running tools such as grunt or gulp. The APIs can also be invoked directly.

This is an open source project maintained by Oracle Corp.

## Installation
This module will be automatically installed when you scaffold a web app following the [Oracle JET Developers Guide](http://www.oracle.com/pls/topic/lookup?ctx=jet1700&id=homepage).
This module will be automatically installed when you scaffold a web app following the [Oracle JET Developers Guide](http://www.oracle.com/pls/topic/lookup?ctx=jet1710&id=homepage).

## Contributing
This project is not accepting external contributions at this time. For bugs or enhancement requests, please file a GitHub issue unless it’s security related. When filing a bug remember that the better written the bug is, the more likely it is to be fixed. If you think you’ve found a security vulnerability, do not raise a GitHub issue and follow the instructions in our [security policy](./SECURITY.md).
Expand Down
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Release Notes for oraclejet-tooling ##

### 17.0.0
### 17.1.0

### 11.0.0
* oraclejet-tooling now requires node 12.21 or later
Expand Down
44 changes: 29 additions & 15 deletions lib/buildCommon/compileTypescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ function compileApplicationTypescript(context) {
() => hookRunner('before_app_typescript', context),
// rename the index files in vcomponents in mono-packs
() => _generateStubFile({ context }),
// remove the pre-existing type folders if exists
() => _removePreExistingTypesFoldersInWeb({ context }),
// compile app typescript
() => _runTypescriptCompilation({ context }),
// copy runtime sources to /js
Expand Down Expand Up @@ -1511,22 +1509,38 @@ function verifyOtherContentsInMonoPack({ context, packComponentJson, packContent
* @param {object} context
*/
function _removePreExistingTypesFoldersInWeb({ context }) {
const compositeComponents = context.opts.component ? [context.opts.component] :
util.getLocalCompositeComponents();
compositeComponents.forEach((compositeComponent) => {
const componentJson = util.getComponentJson({ component: compositeComponent });
const pathToComponentTypesFolder = path.join(
context.opts.stagingPath,
util.isVDOMApplication() ? '' : 'ts',
context.paths.components,
compositeComponent,
let pathToComponentTypesFolder;
const { pack, component } = (context.opts && context.opts.typescript) ?
context.opts.typescript : {};
const pathToComponentsFolder = path.join(
context.opts.stagingPath,
util.isVDOMApplication() ? '' : 'ts',
context.paths.components
);

if (pack && component) {
const componentJson = util.getComponentJson({ component: pack });
pathToComponentTypesFolder = path.join(
pathToComponentsFolder,
pack,
util.useUnversionedStructure(context) ? '' : componentJson.version,
'types',
component
);
} else if (component) {
const componentJson = util.getComponentJson({ component });
pathToComponentTypesFolder = path.join(
pathToComponentsFolder,
component,
util.useUnversionedStructure(context) ? '' : componentJson.version,
'types'
);
if (fs.existsSync(pathToComponentTypesFolder)) {
fs.removeSync(pathToComponentTypesFolder);
}
});
}

if (fs.existsSync(pathToComponentTypesFolder)) {
fs.removeSync(pathToComponentTypesFolder);
}

return Promise.resolve(context);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
DEFAULT_STABLE_THEME: 'stable',
DEFAULT_BROWSER: 'chrome',
DEFAULT_INSTALLER: 'npm',
SASS_VER: '8.0.0',
SASS_VER: '9.0.0',
COMMON_THEME_DIRECTORY: 'common',
JET_COMPOSITE_DIRECTORY: 'jet-composites',
JET_COMPONENTS_DIRECTORY: 'jet_components',
Expand Down
31 changes: 21 additions & 10 deletions lib/mainJsInjector.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function _replaceReleasePath(context, buildType, config, platform, injectedFile)
const baseUrlValue = util.readPathMappingJson().baseUrl;

let newBaseUrl;
if (baseUrlValue) {
if (baseUrlValue && baseUrlInjectorPatternResult) {
newBaseUrl = `${indentStr}baseUrl: ${stringChar}${baseUrlValue}${stringChar},`;
} else {
newBaseUrl = baseUrlResult[0];
Expand Down Expand Up @@ -405,7 +405,7 @@ function _addComponentsIntoTestMainFile(pathToMainTestFile, pathsObj) {
function _addComponentsIntoJestTestConfig(pathToJestConfigFile, pathsObj) {
const updatedModuleNameMapper = {};
const configPaths = util.getConfiguredPaths();
const regex = /moduleNameMapper:\s*(?<extractedModuleNameMapper>.*)},/gms;
const regex = /moduleNameMapper:\s*{(?<extractedModuleNameMapper>.*)},/gms;
const jestConfigFileContent = fs.readFileSync(pathToJestConfigFile, { encoding: 'utf-8' });
const pathToComponentsInSrc = path.join(
util.destPath(),
Expand All @@ -427,14 +427,25 @@ function _addComponentsIntoJestTestConfig(pathToJestConfigFile, pathsObj) {
});

if (Object.getOwnPropertyNames(updatedModuleNameMapper).length !== 0) {
fs.writeFileSync(
pathToJestConfigFile,
jestConfigFileContent.replace(
regex.exec(jestConfigFileContent).groups.extractedModuleNameMapper,
JSON.stringify(updatedModuleNameMapper)
.replaceAll('}', '')
)
);
const executedRegex = regex.exec(jestConfigFileContent);
const extractedGroups = executedRegex && executedRegex.groups;
const extractedNameMapper = extractedGroups && extractedGroups.extractedModuleNameMapper;
if (extractedNameMapper) {
fs.writeFileSync(
pathToJestConfigFile,
jestConfigFileContent.replace(
extractedNameMapper,
JSON.stringify({
...JSON.parse(`{${extractedNameMapper}}`),
...updatedModuleNameMapper
},
false,
6
).replaceAll('{', '')
.replaceAll('}', '')
)
);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/templates/pack/component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pack@",
"version": "1.0.0",
"jetVersion": "17.0.0",
"jetVersion": "17.1.0",
"type": "pack",
"displayName": "A user friendly, translatable name of the pack.",
"description": "A translatable high-level description for the pack.",
Expand Down
3 changes: 0 additions & 3 deletions lib/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ module.exports = {
replacement: webpackUtils.getStyleLinkTags()
}
]),
new MiniCssExtractPlugin({
filename: `${configPaths.src.styles}/[name].[fullhash].css`
}),
// This plugin sets options for the ojL10n-loader (in this case, just the locale name)
new webpack.LoaderOptionsPlugin({
options: {
Expand Down
8 changes: 6 additions & 2 deletions lib/webpack/webpack.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const PreactRefreshPlugin = ojetUtils.requireLocalFirst('@prefresh/webpack');
const {
merge
} = ojetUtils.requireLocalFirst('webpack-merge');
const MiniCssExtractPlugin = ojetUtils.requireLocalFirst('mini-css-extract-plugin');
const configPaths = ojetUtils.getConfiguredPaths();

module.exports = merge(common, {
Expand All @@ -32,9 +33,12 @@ module.exports = merge(common, {
compress: true,
port: 8000,
open: true,
hot: true,
hot: true
},
plugins: [
new PreactRefreshPlugin()
new PreactRefreshPlugin(),
new MiniCssExtractPlugin({
filename: `${configPaths.src.styles}/[name].css`
})
],
});
10 changes: 7 additions & 3 deletions lib/webpack/webpack.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ const configPaths = ojetUtils.getConfiguredPaths();
const {
CleanWebpackPlugin
} = ojetUtils.requireLocalFirst('clean-webpack-plugin');
const MiniCssExtractPlugin = ojetUtils.requireLocalFirst('mini-css-extract-plugin');

module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
output: {
filename: 'js/[name].[fullhash].js',
chunkFilename: 'js/[name].[fullhash].js',
filename: 'js/[name].[chunkhash].js',
chunkFilename: 'js/[name].[chunkhash].js',
path: path.resolve(configPaths.staging.web),
clean: true
},
Expand All @@ -43,6 +44,9 @@ module.exports = merge(common, {
deleteOriginalAssets: false,
}),
new webpack.optimize.ModuleConcatenationPlugin(),
new CleanWebpackPlugin()
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: `${configPaths.src.styles}/[name].[contenthash].css`
})
],
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oracle/oraclejet-tooling",
"version": "17.0.0",
"version": "17.1.0",
"license": "UPL-1.0",
"description": "Programmatic API to build and serve Oracle JET web and mobile applications",
"keywords": [
Expand Down Expand Up @@ -32,10 +32,10 @@
"requirejs": "~2.3.6",
"terser": "~5.19.2",
"gaze": "~1.1.2",
"express": "4.19.2",
"express": "4.21.0",
"connect-livereload": "~0.6.0",
"tiny-lr": "2.0.0",
"serve-static": "~1.13.0",
"serve-static": "1.16.2",
"serve-index": "~1.9.1",
"open": "6.4.0",
"svgo": "~2.7.0",
Expand Down

0 comments on commit 0e8e251

Please sign in to comment.