resume-cli 3.8.0 → 3.8.2
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/build/render-html.js +20 -2
- package/package.json +2 -2
package/build/render-html.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.withStringLocations = exports.resolveThemePath = exports.loadTheme = exports.default = void 0;
|
|
6
|
+
exports.withStringLocations = exports.withProjectSummaries = exports.resolveThemePath = exports.loadTheme = exports.default = void 0;
|
|
7
7
|
var _themeErrors = require("./theme-errors");
|
|
8
8
|
const {
|
|
9
9
|
pathToFileURL
|
|
@@ -149,7 +149,25 @@ const withStringLocations = resume => {
|
|
|
149
149
|
}
|
|
150
150
|
return out;
|
|
151
151
|
};
|
|
152
|
+
|
|
153
|
+
// projects[].summary is preferred over its deprecated alias description
|
|
154
|
+
// (#296); give themes both so either field renders. summary wins.
|
|
152
155
|
exports.withStringLocations = withStringLocations;
|
|
156
|
+
const withProjectSummaries = resume => {
|
|
157
|
+
if (!resume || !Array.isArray(resume.projects)) return resume;
|
|
158
|
+
return {
|
|
159
|
+
...resume,
|
|
160
|
+
projects: resume.projects.map(project => {
|
|
161
|
+
const text = project?.summary ?? project?.description;
|
|
162
|
+
return text === undefined ? project : {
|
|
163
|
+
...project,
|
|
164
|
+
summary: text,
|
|
165
|
+
description: text
|
|
166
|
+
};
|
|
167
|
+
})
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
exports.withProjectSummaries = withProjectSummaries;
|
|
153
171
|
var _default = async ({
|
|
154
172
|
resume,
|
|
155
173
|
themePath
|
|
@@ -158,6 +176,6 @@ var _default = async ({
|
|
|
158
176
|
if (typeof theme?.render !== 'function') {
|
|
159
177
|
throw new Error('theme.render is not a function');
|
|
160
178
|
}
|
|
161
|
-
return theme.render(withStringLocations(resume));
|
|
179
|
+
return theme.render(withProjectSummaries(withStringLocations(resume)));
|
|
162
180
|
};
|
|
163
181
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resume-cli",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"description": "The JSON Resume command line interface",
|
|
5
5
|
"main": "build/main.js",
|
|
6
6
|
"engines": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"yaml-js": "^0.2.3",
|
|
44
44
|
"yesno": "^0.3.1",
|
|
45
45
|
"@jsonresume/ats-validator": "0.3.0",
|
|
46
|
-
"@jsonresume/schema": "1.
|
|
46
|
+
"@jsonresume/schema": "1.6.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@babel/cli": "^7.25.0",
|