@docusaurus/utils-common 2.0.0-beta.14 → 2.0.0-beta.16
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.
- package/lib/applyTrailingSlash.js +2 -2
- package/lib/applyTrailingSlash.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/src/applyTrailingSlash.ts +2 -2
- package/src/index.ts +5 -2
|
@@ -31,8 +31,8 @@ function applyTrailingSlash(path, options) {
|
|
|
31
31
|
const [pathname] = path.split(/[#?]/);
|
|
32
32
|
// Never transform '/' to ''
|
|
33
33
|
// Never remove the baseUrl trailing slash!
|
|
34
|
-
// If baseUrl = /myBase/, we want to emit /myBase/index.html and not
|
|
35
|
-
// See https://github.com/facebook/docusaurus/issues/5077
|
|
34
|
+
// If baseUrl = /myBase/, we want to emit /myBase/index.html and not
|
|
35
|
+
// /myBase.html! See https://github.com/facebook/docusaurus/issues/5077
|
|
36
36
|
const shouldNotApply = pathname === '/' || pathname === baseUrl;
|
|
37
37
|
const newPathname = shouldNotApply
|
|
38
38
|
? pathname
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyTrailingSlash.js","sourceRoot":"","sources":["../src/applyTrailingSlash.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AASH,qEAAqE;AACrE,SAAwB,kBAAkB,CACxC,IAAY,EACZ,OAAiC;IAEjC,MAAM,EAAC,aAAa,EAAE,OAAO,EAAC,GAAG,OAAO,CAAC;IAEzC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QACxB,+CAA+C;QAC/C,OAAO,IAAI,CAAC;KACb;IAED,sDAAsD;IACtD,SAAS,gBAAgB,CAAC,GAAW;QACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC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C,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACpD,CAAC;IACD,SAAS,mBAAmB,CAAC,GAAW,EAAE,QAAiB;QACzD,OAAO,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACrE,CAAC;IAED,8CAA8C;IAC9C,IAAI,OAAO,aAAa,KAAK,WAAW,EAAE;QACxC,OAAO,IAAI,CAAC;KACb;IAED,iEAAiE;IACjE,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAEtC,4BAA4B;IAC5B,2CAA2C;IAC3C,oEAAoE;IACpE,uEAAuE;IACvE,MAAM,cAAc,GAAG,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,OAAO,CAAC;IAEhE,MAAM,WAAW,GAAG,cAAc;QAChC,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;IAEjD,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC7C,CAAC;AAzCD,qCAyCC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
export type
|
|
7
|
+
export declare const blogPostContainerID = "post-content";
|
|
8
|
+
export { default as applyTrailingSlash, type ApplyTrailingSlashParams, } from './applyTrailingSlash';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,OAAO,EACL,OAAO,IAAI,kBAAkB,EAC7B,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -9,7 +9,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.applyTrailingSlash = void 0;
|
|
12
|
+
exports.applyTrailingSlash = exports.blogPostContainerID = void 0;
|
|
13
|
+
exports.blogPostContainerID = 'post-content';
|
|
13
14
|
var applyTrailingSlash_1 = require("./applyTrailingSlash");
|
|
14
15
|
Object.defineProperty(exports, "applyTrailingSlash", { enumerable: true, get: function () { return __importDefault(applyTrailingSlash_1).default; } });
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAEU,QAAA,mBAAmB,GAAG,cAAc,CAAC;AAClD,2DAG8B;AAF5B,yIAAA,OAAO,OAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/utils-common",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.16",
|
|
4
4
|
"description": "Common (Node/Browser) utility functions for Docusaurus packages.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"tslib": "^2.3.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@docusaurus/types": "2.0.0-beta.
|
|
24
|
+
"@docusaurus/types": "2.0.0-beta.16"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": ">=14"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "eb43c4d4f95a4fb97dc9bb9dc615413e0dc2e1e7"
|
|
30
30
|
}
|
|
@@ -45,8 +45,8 @@ export default function applyTrailingSlash(
|
|
|
45
45
|
|
|
46
46
|
// Never transform '/' to ''
|
|
47
47
|
// Never remove the baseUrl trailing slash!
|
|
48
|
-
// If baseUrl = /myBase/, we want to emit /myBase/index.html and not
|
|
49
|
-
// See https://github.com/facebook/docusaurus/issues/5077
|
|
48
|
+
// If baseUrl = /myBase/, we want to emit /myBase/index.html and not
|
|
49
|
+
// /myBase.html! See https://github.com/facebook/docusaurus/issues/5077
|
|
50
50
|
const shouldNotApply = pathname === '/' || pathname === baseUrl;
|
|
51
51
|
|
|
52
52
|
const newPathname = shouldNotApply
|
package/src/index.ts
CHANGED
|
@@ -5,5 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export const blogPostContainerID = 'post-content';
|
|
9
|
+
export {
|
|
10
|
+
default as applyTrailingSlash,
|
|
11
|
+
type ApplyTrailingSlashParams,
|
|
12
|
+
} from './applyTrailingSlash';
|