ohos-router 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/router.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohos-router",
3
- "version": "1.0.9",
3
+ "version": "1.1.0",
4
4
  "description": "鸿蒙路由管理插件",
5
5
  "main": "main.js",
6
6
  "scripts": {
package/router.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { HvigorNode, FileUtil } from '@ohos/hvigor';
1
+ import {HvigorNode, FileUtil} from '@ohos/hvigor';
2
2
 
3
3
  let entryModulePath = ""
4
4
  let entryUpperCaseNameArray: string[] = []
@@ -311,8 +311,8 @@ function writeBuildProfile(childNode: HvigorNode) {
311
311
  let ohPackageData = FileUtil.readJson5(ohPackagePath)
312
312
  dependenciesJSONParse(JSON.stringify(ohPackageData))
313
313
  buildProfilePath = FileUtil.pathResolve(childNode.getNodePath(), "build-profile.json5")
314
- let buildProfileData = FileUtil.readJson5(buildProfilePath)
315
- buildProfileJSONParse(JSON.stringify(buildProfileData))
314
+ let buildProfileData = FileUtil.readFileSync(buildProfilePath)
315
+ buildProfileJSONParse(buildProfileData.toString())
316
316
  }
317
317
 
318
318
  function getNowTime() {
@@ -486,6 +486,6 @@ function addPropertyToBeginning<T extends object, K extends string, V>(
486
486
  key: K,
487
487
  value: V
488
488
  ): T & { [P in K]: V } {
489
- const newObj = { [key]: value, ...obj } as T & { [P in K]: V };
489
+ const newObj = {[key]: value, ...obj} as T & { [P in K]: V };
490
490
  return newObj;
491
491
  }