Skip to content

Commit 8307d78

Browse files
committed
feat(webpack): use scoped @nativescript/webpack
1 parent 037186c commit 8307d78

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

docs/man_pages/general/update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ position: 16
77

88
### Description
99

10-
Updates the project with the latest versions of iOS/Android runtimes, cross-platform modules and "nativescript-dev-webpack".
10+
Updates the project with the latest versions of iOS/Android runtimes, cross-platform modules and "@nativescript/webpack".
1111
In order to get the latest development release instead, pass `next` as argument:
1212
`tns update next`
1313

lib/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const TNS_CORE_MODULES_NAME = "tns-core-modules";
1313
export const SCOPED_TNS_CORE_MODULES = "@nativescript/core";
1414
export const TNS_CORE_THEME_NAME = "nativescript-theme-core";
1515
export const SCOPED_TNS_CORE_THEME_NAME = "@nativescript/theme";
16-
export const WEBPACK_PLUGIN_NAME = "nativescript-dev-webpack";
16+
export const WEBPACK_PLUGIN_NAME = "@nativescript/webpack";
1717
export const TNS_CORE_MODULES_WIDGETS_NAME = "tns-core-modules-widgets";
1818
export const TNS_ANDROID_RUNTIME_NAME = "tns-android";
1919
export const TNS_IOS_RUNTIME_NAME = "tns-ios";
@@ -298,7 +298,7 @@ export class IosProjectConstants {
298298

299299
export class BundleValidatorMessages {
300300
public static MissingBundlePlugin = "Passing --bundle requires a bundling plugin. No bundling plugin found or the specified bundling plugin is invalid.";
301-
public static NotSupportedVersion = `The NativeScript CLI requires nativescript-dev-webpack %s or later to work properly. After updating nativescript-dev-webpack you need to ensure "webpack.config.js" file is up to date with the one in the new version of nativescript-dev-webpack. You can automatically update it using "./node_modules/.bin/update-ns-webpack --configs" command.`;
301+
public static NotSupportedVersion = `The NativeScript CLI requires @nativescript/webpack %s or later to work properly. After updating @nativescript/webpack you need to ensure "webpack.config.js" file is up to date with the one in the new version of @nativescript/webpack. You can automatically update it using "./node_modules/.bin/update-ns-webpack --configs" command.`;
302302
}
303303

304304
export class AndroidBundleValidatorMessages {

lib/controllers/migrate-controller.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ Running this command will ${MigrateController.COMMON_MIGRATE_MESSAGE}`;
6363
{ packageName: "nativescript-dev-sass", isDev: true, replaceWith: "node-sass" },
6464
{ packageName: "nativescript-dev-typescript", isDev: true, replaceWith: MigrateController.typescriptPackageName },
6565
{ packageName: "nativescript-dev-less", isDev: true, shouldRemove: true, warning: "LESS CSS is not supported out of the box. In order to enable it, follow the steps in this feature request: https://github.com/NativeScript/nativescript-dev-webpack/issues/967" },
66-
{ packageName: constants.WEBPACK_PLUGIN_NAME, isDev: true, shouldAddIfMissing: true, verifiedVersion: "1.0.1" },
6766
{ packageName: "nativescript-camera", verifiedVersion: "4.5.0" },
6867
{ packageName: "nativescript-geolocation", verifiedVersion: "5.1.0" },
6968
{ packageName: "nativescript-imagepicker", verifiedVersion: "6.2.0" },

lib/declarations.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,8 @@ interface IXcconfigService {
921921
interface IBundleValidatorHelper {
922922
/**
923923
* Validates bundling options.
924-
* In case when minSupportedVersion is provided, gets the current version of nativescript-dev-webpack from package.json and compares with the provided version.
925-
* @param {string} minSupportedVersion the minimum supported version of nativescript-dev-webpack
924+
* In case when minSupportedVersion is provided, gets the current version of @nativescript/webpack from package.json and compares with the provided version.
925+
* @param {string} minSupportedVersion the minimum supported version of @nativescript/webpack
926926
* @return {void}
927927
*/
928928
validate(projectData: IProjectData, minSupportedVersion?: string): void;

lib/services/webpack/webpack-compiler-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
250250
const installedWebpackPluginVersion = await this.$packageInstallationManager.getInstalledDependencyVersion(WEBPACK_PLUGIN_NAME, projectData.projectDir);
251251
const hasWebpackPluginWithWinSnapshotsSupport = !!installedWebpackPluginVersion ? semver.gte(semver.coerce(installedWebpackPluginVersion), minWebpackPluginWithWinSnapshotsVersion) : true;
252252
if (!hasWebpackPluginWithWinSnapshotsSupport) {
253-
this.$errors.fail(`In order to generate Snapshots on Windows, please upgrade your Webpack plugin version (npm i nativescript-dev-webpack@latest).`);
253+
this.$errors.fail(`In order to generate Snapshots on Windows, please upgrade your Webpack plugin version (npm i ${WEBPACK_PLUGIN_NAME}@latest).`);
254254
}
255255
}
256256
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nativescript",
33
"preferGlobal": true,
4-
"version": "6.7.8",
4+
"version": "6.8.0-alpha.0",
55
"author": "NativeScript <support@nativescript.org>",
66
"description": "Command-line interface for building NativeScript projects",
77
"bin": {

test/controllers/update-controller.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ describe("update controller method tests", () => {
137137
"tns-core-modules": "0.1.0",
138138
},
139139
devDependencies: {
140-
"nativescript-dev-webpack": "1.1.3"
140+
"@nativescript/webpack": "1.1.3"
141141
}
142142
};
143143
};
@@ -162,7 +162,7 @@ describe("update controller method tests", () => {
162162
},
163163
devDependencies: {
164164
"devDep1": "1.2.0",
165-
"nativescript-dev-webpack": "1.3.0"
165+
"@nativescript/webpack": "1.3.0"
166166
},
167167
name: "template1"
168168
};
@@ -193,7 +193,7 @@ describe("update controller method tests", () => {
193193
"tns-core-modules": "1.0.0",
194194
},
195195
devDependencies: {
196-
"nativescript-dev-webpack": "1.3.0"
196+
"@nativescript/webpack": "1.3.0"
197197
}
198198
});
199199
});

0 commit comments

Comments
 (0)