Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Prepare for 2.1.1 (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanokwa authored Nov 4, 2021
1 parent 54a14a6 commit 78cc9db
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 37 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

[2.1.1] - 2021-11-04
------------------------
##### Fixed
- Preserve query parameters in media mapping URLs

[2.1.0] - 2021-10-11
------------------------
##### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![coverage-shield-badge-1](https://img.shields.io/badge/coverage-97.86%25-brightgreen.svg)
![coverage-shield-badge-1](https://img.shields.io/badge/coverage-97.85%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)

Enketo Transformer
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ <h4 class="name" id="getMediaPath"><span class="type-signature"></span>getMediaP

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="url.js.html">url.js</a>, <a href="url.js.html#line27">line 27</a>
<a href="url.js.html">url.js</a>, <a href="url.js.html#line24">line 24</a>
</li></ul></dd>


Expand Down
4 changes: 3 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h3> </h3>


<section class="readme usertext">
<article><p><img src="https://img.shields.io/badge/coverage-97.86%25-brightgreen.svg" alt="coverage-shield-badge-1">
<article><p><img src="https://img.shields.io/badge/coverage-97.85%25-brightgreen.svg" alt="coverage-shield-badge-1">
<a href="http://badge.fury.io/js/enketo-transformer"><img src="https://badge.fury.io/js/enketo-transformer.svg" alt="npm version"></a> <a href="https://travis-ci.org/enketo/enketo-transformer"><img src="https://travis-ci.org/enketo/enketo-transformer.svg?branch=master" alt="Build Status"></a> <a href="https://david-dm.org/enketo/enketo-transformer"><img src="https://david-dm.org/enketo/enketo-transformer.svg" alt="Dependency Status"></a></p>
<h1 id="enketo-transformer">Enketo Transformer</h1>
<p>NodeJS library that transforms OpenRosa/ODK XForms into a format the Enketo understands. It works both as a library module, as well as a standalone app.</p>
Expand Down Expand Up @@ -166,6 +166,8 @@ <h3 id="release">Release</h3>
<li>Run <code>npm audit fix --production</code> to apply most important fixes</li>
</ul>
</li>
<li>Run <code>npm ci</code></li>
<li>Run <code>npm test</code></li>
<li>Run <code>npm run build-docs</code></li>
<li>Update <code>CHANGELOG.md</code></li>
<li>Update version in <code>package.json</code>
Expand Down
13 changes: 5 additions & 8 deletions docs/url.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h1 class="page-title">url.js</h1>
* @param {string} value - a fully qualified URL, or a relative path
* @return {string}
*/
function escapeURLPath( value ) {
function escapeURLPath( value ) {
const isFullyQualified = ( /^[a-z]+:/i ).test( value );
const urlString = isFullyQualified ? value : `file:///${value.replace( /^\//, '' )}`;
const url = new URL( urlString );
Expand All @@ -60,20 +60,17 @@ <h1 class="page-title">url.js</h1>
return url.href;
}

const { pathname } = url;
const { pathname, search } = url;
const path = value.startsWith( '/' ) ? pathname : pathname.replace( /^\//, '' );

if ( value.startsWith( '/' ) ) {
return pathname;
}

return pathname.replace( /^\//, '' );
return `${path}${search}`;
}

/**
* @param {Record&lt;string, string>} mediaMap
* @param {string} mediaURL
*/
function getMediaPath( mediaMap, mediaURL ) {
function getMediaPath( mediaMap, mediaURL ) {
const mediaPath = mediaURL.match( /jr:\/\/[\w-]+\/(.+)/ );

if ( mediaPath == null ) {
Expand Down
44 changes: 19 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enketo-transformer",
"version": "2.1.0",
"version": "2.1.1",
"description": "Library/app that transforms ODK-compliant XForms into a format that Enketo can consume",
"license": "Apache-2.0",
"main": "src/transformer.js",
Expand Down

0 comments on commit 78cc9db

Please sign in to comment.