@manuscripts/transform 4.2.4 → 4.2.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.
@@ -19,7 +19,10 @@ const create_article_node_1 = require("../importer/create-article-node");
19
19
  const utils_1 = require("./utils");
20
20
  describe('Create empty document', () => {
21
21
  it('should create an empty document', () => {
22
- const doc = (0, create_article_node_1.createArticleNode)({ id: 'manuscript:123' });
22
+ const doc = (0, create_article_node_1.createArticleNode)({
23
+ id: 'manuscript:123',
24
+ articleType: 'research-article',
25
+ });
23
26
  (0, utils_1.changeIDs)(doc);
24
27
  expect(doc).toMatchSnapshot();
25
28
  });
@@ -235,7 +235,7 @@ class JATSDOMParser {
235
235
  const dates = this.parseHistoryDates(history);
236
236
  return {
237
237
  doi: (0, utils_1.getTrimmedTextContent)(doi),
238
- articleType: element.getAttribute('article-type') ?? '',
238
+ articleType: element.getAttribute('article-type') || '',
239
239
  primaryLanguageCode: element.getAttribute('lang') ?? '',
240
240
  ...dates,
241
241
  };
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "4.2.4";
4
+ exports.VERSION = "4.2.6";
@@ -17,7 +17,10 @@ import { createArticleNode } from '../importer/create-article-node';
17
17
  import { changeIDs } from './utils';
18
18
  describe('Create empty document', () => {
19
19
  it('should create an empty document', () => {
20
- const doc = createArticleNode({ id: 'manuscript:123' });
20
+ const doc = createArticleNode({
21
+ id: 'manuscript:123',
22
+ articleType: 'research-article',
23
+ });
21
24
  changeIDs(doc);
22
25
  expect(doc).toMatchSnapshot();
23
26
  });
@@ -232,7 +232,7 @@ export class JATSDOMParser {
232
232
  const dates = this.parseHistoryDates(history);
233
233
  return {
234
234
  doi: getTrimmedTextContent(doi),
235
- articleType: element.getAttribute('article-type') ?? '',
235
+ articleType: element.getAttribute('article-type') || '',
236
236
  primaryLanguageCode: element.getAttribute('lang') ?? '',
237
237
  ...dates,
238
238
  };
@@ -1 +1 @@
1
- export const VERSION = "4.2.4";
1
+ export const VERSION = "4.2.6";
@@ -56,6 +56,7 @@ export type ManuscriptTemplate = {
56
56
  bundle: string;
57
57
  title: string;
58
58
  sectionCategories: SectionCategory[];
59
+ articleType: string;
59
60
  };
60
61
  export type MarkRule = ParseRule & {
61
62
  mark: Marks | null;
@@ -1 +1 @@
1
- export declare const VERSION = "4.2.4";
1
+ export declare const VERSION = "4.2.6";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@manuscripts/transform",
3
3
  "description": "ProseMirror transformer for Manuscripts applications",
4
- "version": "4.2.4",
4
+ "version": "4.2.6",
5
5
  "repository": "github:Atypon-OpenSource/manuscripts-transform",
6
6
  "license": "Apache-2.0",
7
7
  "main": "dist/cjs",