Skip to content

Commit 5e4e8f8

Browse files
committed
Rename schema version, update code, docs, & types
- Change `v0.0.16` to be `legacy` instead of `stable`, have `v1` now be `stable`, and keep `beta` just in case there are new features in the future - Update filenames, comments, code, and types to reflect changes - Update popup dropdown
1 parent 34ed11c commit 5e4e8f8

7 files changed

+95
-94
lines changed

browser-ext/popup.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<div class="specSelectWrapper">
3030
Select JSONResume version:
3131
<select id="specSelect">
32-
<option value="stable">Stable (v0.0.16)</option>
33-
<option value="latest" selected>Latest (v1.0.0)</option>
34-
<option value="beta">Beta (v0.1.3 + extra)</option>
32+
<option value="legacy">Legacy (v0.0.16)</option>
33+
<option value="stable" selected>Stable (v1.0.0)</option>
34+
<option value="beta">Currently even with stable (v1.0.0)</option>
3535
</select>
3636
</div>
3737
</div>

browser-ext/popup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const STORAGE_KEYS = {
1111
};
1212
const SPEC_SELECT = /** @type {HTMLSelectElement} */ (document.getElementById('specSelect'));
1313
/** @type {SchemaVersion[]} */
14-
const SPEC_OPTIONS = ['beta', 'stable', 'latest'];
14+
const SPEC_OPTIONS = ['legacy', 'stable', 'beta'];
1515
/** @type {HTMLSelectElement} */
1616
const LANG_SELECT = document.querySelector('.langSelect');
1717

global.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {ResumeSchemaStable as _ResumeSchemaStable} from './jsonresume.schema.stable';
2-
import {ResumeSchemaLatest as _ResumeSchemaLatest, ResumeSchemaBeyondSpec as _ResumeSchemaBeyondSpec} from './jsonresume.schema.latest';
1+
import {ResumeSchemaLegacy as _ResumeSchemaLegacy} from './jsonresume.schema.legacy';
2+
import {ResumeSchemaStable as _ResumeSchemaStable, ResumeSchemaBeyondSpec as _ResumeSchemaBeyondSpec} from './jsonresume.schema.latest';
33

44
declare global {
55
interface GenObj {
@@ -138,9 +138,9 @@ declare global {
138138
}
139139
}
140140

141-
type SchemaVersion = 'stable' | 'latest' | 'beta';
141+
type SchemaVersion = 'legacy' | 'stable' | 'beta';
142142

143+
type ResumeSchemaLegacy = _ResumeSchemaLegacy;
143144
type ResumeSchemaStable = _ResumeSchemaStable;
144-
type ResumeSchemaLatest = _ResumeSchemaLatest;
145145
type ResumeSchemaBeyondSpec = _ResumeSchemaBeyondSpec;
146146
}

jsonresume.schema.latest.ts

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
/**
2-
* @file Represents the latest version of the schema that I'm willing to support / implement
2+
* @file Represents the current version(s) of the schema
33
* - Currently v1.0.0
44
* @see https://github.com/jsonresume/resume-schema/blob/v1.0.0/schema.json
55
* - Permalink of above: https://github.com/jsonresume/resume-schema/blob/8a5b3982f8e5b9f8840398e162a6e0c418d023da/schema.json
66
*/
77

88
// All of these imports are because the spec is the same for the sub-section in both stable and latest (this doc)
9-
import {Iso8601, Award, Location, Profile, Interest, Language, Reference, Skill, ResumeSchemaStable} from './jsonresume.schema.stable';
9+
import {Iso8601, Award, Location, Profile, Interest, Language, Reference, Skill, ResumeSchemaLegacy} from './jsonresume.schema.legacy';
10+
1011
// Re-export
1112
export {
1213
Iso8601,
@@ -155,14 +156,14 @@ export interface Project {
155156
url?: string;
156157
}
157158

158-
export type Publication = Omit<ResumeSchemaStable['publications'][0], 'website'> & {
159+
export type Publication = Omit<ResumeSchemaLegacy['publications'][0], 'website'> & {
159160
/**
160161
* e.g. http://www.computer.org.example.com/csdl/mags/co/1996/10/rx069-abs.html
161162
*/
162163
url?: string;
163164
}
164165

165-
export type Volunteer = Omit<ResumeSchemaStable['volunteer'][0], 'website'> & {
166+
export type Volunteer = Omit<ResumeSchemaLegacy['volunteer'][0], 'website'> & {
166167
/**
167168
* e.g. https://www.eff.org/
168169
*/
@@ -202,7 +203,7 @@ export interface Work {
202203
url?: string;
203204
}
204205

205-
export interface ResumeSchemaLatest {
206+
export interface ResumeSchemaStable {
206207
/**
207208
* link to the version of the schema that can validate the resume
208209
*/
@@ -243,6 +244,7 @@ export interface ResumeSchemaLatest {
243244
work?: Work[];
244245
}
245246

246-
export interface ResumeSchemaBeyondSpec extends ResumeSchemaLatest {
247-
certificates: Certificate[];
248-
}
247+
/**
248+
* Currently even - nothing beyond v1
249+
*/
250+
export interface ResumeSchemaBeyondSpec extends ResumeSchemaStable {}

jsonresume.schema.stable.ts jsonresume.schema.legacy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export interface Work {
258258
website?: string;
259259
}
260260

261-
export interface ResumeSchemaStable {
261+
export interface ResumeSchemaLegacy {
262262
/**
263263
* Specify any awards you have received throughout your professional career
264264
*/

0 commit comments

Comments
 (0)