Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enketo-transformer

Package Overview
Dependencies
Maintainers
3
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enketo-transformer - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

6

CHANGELOG.md

@@ -6,2 +6,8 @@ ## Change Log

## [2.1.5] - 2022-05-05
##### Changed
- Fixed regression when transforming forms with no media mapping, when the form has binary defaults or references jr: URLs in markdown. (#152)
## [2.1.4] - 2022-05-04

@@ -8,0 +14,0 @@

2

package.json
{
"name": "enketo-transformer",
"version": "2.1.4",
"version": "2.1.5",
"description": "Library/app that transforms ODK-compliant XForms into a format that Enketo can consume",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -1,2 +0,2 @@

![coverage-shield-badge-1](https://img.shields.io/badge/coverage-98.31%25-brightgreen.svg)
![coverage-shield-badge-1](https://img.shields.io/badge/coverage-97.86%25-brightgreen.svg)
[![npm version](https://badge.fury.io/js/enketo-transformer.svg)](http://badge.fury.io/js/enketo-transformer) [![Build Status](https://travis-ci.org/enketo/enketo-transformer.svg?branch=master)](https://travis-ci.org/enketo/enketo-transformer) [![Dependency Status](https://david-dm.org/enketo/enketo-transformer.svg)](https://david-dm.org/enketo/enketo-transformer)

@@ -3,0 +3,0 @@

@@ -83,12 +83,8 @@ /**

let mediaMap = null;
const mediaMap = Object.fromEntries(
Object.entries(survey.media || {}).map((entry) =>
entry.map(escapeURLPath)
)
);
if (survey.media) {
mediaMap = Object.fromEntries(
Object.entries(survey.media).map((entry) =>
entry.map(escapeURLPath)
)
);
}
return _parseXml(survey.xform)

@@ -505,13 +501,11 @@ .then((doc) => {

if (original !== rendered) {
if (mediaMap != null) {
const fragment = libxmljs.parseHtmlFragment(
`<div class="temporary-root">${rendered}</div>`
);
const fragment = libxmljs.parseHtmlFragment(
`<div class="temporary-root">${rendered}</div>`
);
rendered = _replaceMediaSources(fragment, mediaMap)
.root()
.childNodes()
.map((node) => node.toString(false))
.join('');
}
rendered = _replaceMediaSources(fragment, mediaMap)
.root()
.childNodes()
.map((node) => node.toString(false))
.join('');

@@ -518,0 +512,0 @@ key = `$$$${index}`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc