umberto 10.1.0 → 10.1.1
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/CHANGELOG.md +7 -12
- package/package.json +1 -1
- package/src/tasks/compile-sass.js +15 -45
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [10.1.1](https://github.com/cksource/umberto/compare/v10.1.0...v10.1.1) (March 4, 2026)
|
|
5
|
+
|
|
6
|
+
### Bug fixes
|
|
7
|
+
|
|
8
|
+
* Fixed a deprecation warning displayed during documentation builds by migrating Sass compilation to the modern Dart Sass JavaScript API. The `legacy-js-api` warning is no longer emitted.
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
## [10.1.0](https://github.com/cksource/umberto/compare/v10.0.0...v10.1.0) (March 4, 2026)
|
|
5
12
|
|
|
6
13
|
### Features
|
|
@@ -51,18 +58,6 @@ Changelog
|
|
|
51
58
|
|
|
52
59
|
* Improved rendering of [`templateLiteral`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) types that reference a module. They are now rendered as clickable links pointing to the corresponding page.
|
|
53
60
|
|
|
54
|
-
|
|
55
|
-
## [9.2.0](https://github.com/cksource/umberto/compare/v9.1.3...v9.2.0) (January 7, 2026)
|
|
56
|
-
|
|
57
|
-
### Features
|
|
58
|
-
|
|
59
|
-
* Enabled Shiki syntax highlighting for diff blocks in Gloria. This improves the readability and usability of diffs in the documentation.
|
|
60
|
-
|
|
61
|
-
### Bug fixes
|
|
62
|
-
|
|
63
|
-
* Fix crashes of Table of Contents on some pages where headings are not placed in expected HTML structure.
|
|
64
|
-
* No longer stop building of the document when invalid links are found during link validation if some parts of the documentation are skipped (API, SDK, Guides).
|
|
65
|
-
|
|
66
61
|
---
|
|
67
62
|
|
|
68
63
|
To see all releases, visit the [release page](https://github.com/cksource/umberto/releases).
|
package/package.json
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { pathToFileURL } from 'node:url';
|
|
7
7
|
import * as sass from 'sass';
|
|
8
8
|
import fs from 'fs-extra';
|
|
9
9
|
import upath from 'upath';
|
|
10
10
|
|
|
11
|
-
export function compileSass( src, dst ) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
importer( url, file, done ) {
|
|
11
|
+
export async function compileSass( src, dst ) {
|
|
12
|
+
const options = {
|
|
13
|
+
style: 'compressed',
|
|
14
|
+
importers: [ {
|
|
15
|
+
findFileUrl( url ) {
|
|
17
16
|
// In case of import from the `themes/umberto/src` directory.
|
|
18
17
|
const themeMatch = url && url.match( /@([^/]+)\/(.+)/ );
|
|
19
18
|
|
|
@@ -22,53 +21,24 @@ export function compileSass( src, dst ) {
|
|
|
22
21
|
const filePath = upath.join( import.meta.dirname, '../../themes/umberto/src', theme, 'css', remainingPath );
|
|
23
22
|
|
|
24
23
|
if ( fs.existsSync( filePath ) ) {
|
|
25
|
-
return
|
|
24
|
+
return pathToFileURL( filePath );
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
// In case of an import from the `node_modules` directory.
|
|
30
29
|
if ( url.startsWith( '~' ) ) {
|
|
31
|
-
|
|
32
|
-
const absolutePath = fileURLToPath( import.meta.resolve( url.substr( 1 ) ) );
|
|
33
|
-
|
|
34
|
-
return fs.readFile( absolutePath, 'utf-8', ( err, data ) => {
|
|
35
|
-
if ( err ) {
|
|
36
|
-
return done( err );
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return done( {
|
|
40
|
-
contents: data
|
|
41
|
-
} );
|
|
42
|
-
} );
|
|
30
|
+
return new URL( import.meta.resolve( url.substr( 1 ) ) );
|
|
43
31
|
}
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
const directory = upath.dirname( file );
|
|
47
|
-
|
|
48
|
-
// Replace "directory/filename" with "directory/_filename.scss".
|
|
49
|
-
const fileName = url.replace( /(.+)(?:\/(.+))$/, ( match, dirName, fileName ) => {
|
|
50
|
-
return dirName + '/_' + fileName + '.scss';
|
|
51
|
-
} );
|
|
52
|
-
|
|
53
|
-
return done( {
|
|
54
|
-
file: upath.join( directory, fileName )
|
|
55
|
-
} );
|
|
33
|
+
return null;
|
|
56
34
|
}
|
|
57
|
-
}
|
|
35
|
+
} ]
|
|
36
|
+
};
|
|
58
37
|
|
|
59
|
-
|
|
60
|
-
if ( err ) {
|
|
61
|
-
return reject( err );
|
|
62
|
-
}
|
|
38
|
+
const result = await sass.compileAsync( src, options );
|
|
63
39
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if ( err ) {
|
|
67
|
-
return reject( err );
|
|
68
|
-
}
|
|
40
|
+
fs.mkdirsSync( upath.dirname( dst ) );
|
|
41
|
+
await fs.writeFile( upath.resolve( dst ), result.css );
|
|
69
42
|
|
|
70
|
-
|
|
71
|
-
} );
|
|
72
|
-
} );
|
|
73
|
-
} );
|
|
43
|
+
return true;
|
|
74
44
|
}
|