@lwrjs/shared-utils 0.12.0-alpha.4 → 0.12.0-alpha.6

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.
@@ -80,6 +80,7 @@ var DEFAULT_LWR_BOOTSTRAP_CONFIG = {
80
80
  services: [],
81
81
  configAsSrc: false,
82
82
  ssr: false,
83
+ preloadData: false,
83
84
  mixedMode: false,
84
85
  module: void 0,
85
86
  preloadModules: []
@@ -113,19 +113,11 @@ function getViewUri(routePath, basePath, locale, i18n) {
113
113
  url = import_path.default.join(url, `/${locale}`);
114
114
  }
115
115
  url = import_path.default.join(url, routePath);
116
- if (i18n.uriPattern === "query-param" && locale !== i18n.defaultLocale) {
117
- url = addQueryParamToAbsoluteURI(url, "locale", locale);
118
- }
119
116
  return url;
120
117
  }
121
118
  function isURL(uri) {
122
119
  return /^https?:\/\//i.test(uri);
123
120
  }
124
- function addQueryParamToAbsoluteURI(absoluteURI, paramName, paramValue) {
125
- const url = new URL(absoluteURI, "http://example.com");
126
- url.searchParams.set(paramName, paramValue);
127
- return url.pathname + url.search;
128
- }
129
121
  function sortedQueryParamString(query) {
130
122
  if (!query) {
131
123
  return "";
@@ -22,6 +22,7 @@ export const DEFAULT_LWR_BOOTSTRAP_CONFIG = {
22
22
  services: [],
23
23
  configAsSrc: false,
24
24
  ssr: false,
25
+ preloadData: false,
25
26
  mixedMode: false,
26
27
  module: undefined,
27
28
  preloadModules: [],
package/build/es/urls.js CHANGED
@@ -106,9 +106,6 @@ export function getViewUri(routePath, basePath, locale, i18n) {
106
106
  url = path.join(url, `/${locale}`);
107
107
  }
108
108
  url = path.join(url, routePath);
109
- if (i18n.uriPattern === 'query-param' && locale !== i18n.defaultLocale) {
110
- url = addQueryParamToAbsoluteURI(url, 'locale', locale);
111
- }
112
109
  return url;
113
110
  }
114
111
  /**
@@ -117,14 +114,6 @@ export function getViewUri(routePath, basePath, locale, i18n) {
117
114
  export function isURL(uri) {
118
115
  return /^https?:\/\//i.test(uri);
119
116
  }
120
- function addQueryParamToAbsoluteURI(absoluteURI, paramName, paramValue) {
121
- // Use a dummy domain for parsing
122
- const url = new URL(absoluteURI, 'http://example.com');
123
- // Add the query parameter
124
- url.searchParams.set(paramName, paramValue);
125
- // Get the modified URI with the query parameter
126
- return url.pathname + url.search;
127
- }
128
117
  function sortedQueryParamString(query) {
129
118
  if (!query) {
130
119
  return '';
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.12.0-alpha.4",
7
+ "version": "0.12.0-alpha.6",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  "build/**/*.d.ts"
38
38
  ],
39
39
  "dependencies": {
40
- "@lwrjs/diagnostics": "0.12.0-alpha.4",
40
+ "@lwrjs/diagnostics": "0.12.0-alpha.6",
41
41
  "es-module-lexer": "^1.3.0",
42
42
  "fast-json-stable-stringify": "^2.1.0",
43
43
  "magic-string": "^0.30.0",
@@ -50,12 +50,12 @@
50
50
  "slugify": "^1.4.5"
51
51
  },
52
52
  "devDependencies": {
53
- "@lwrjs/types": "0.12.0-alpha.4",
53
+ "@lwrjs/types": "0.12.0-alpha.6",
54
54
  "@types/mime-types": "2.1.1",
55
55
  "@types/path-to-regexp": "^1.7.0"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=18.0.0"
59
59
  },
60
- "gitHead": "7b68e0ffa5e4d61ae97a4b020f9690ee7b08d5da"
60
+ "gitHead": "d9428f6168feea04d3de54129a5861eb4590b26c"
61
61
  }