Comparing version 1.0.0 to 1.1.0
@@ -5,3 +5,3 @@ 'use strict' | ||
const argparse = require('argparse') | ||
const cjt = require('./cjt') | ||
const cjt = require('./src/cjt') | ||
@@ -13,7 +13,6 @@ const printJt = (err, data) => { | ||
} | ||
const parser = new argparse.ArgumentParser({ | ||
version: process.env.npm_config_version, | ||
version: process.env.npm_package_version, | ||
addHelp: true, | ||
description: process.env.npm_config_description | ||
description: process.env.npm_package_description | ||
}) | ||
@@ -34,3 +33,2 @@ parser.addArgument( | ||
) | ||
const args = parser.parseArgs() | ||
@@ -37,0 +35,0 @@ fs.readFile( |
{ | ||
"name": "cjt", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A library to convert CSV text to Jira's table notation", | ||
"main": "index.js", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"dependencies": { | ||
"argparse": "^1.0.10", | ||
"babel-core": "^6.26.3", | ||
"babel-preset-env": "^1.7.0", | ||
"babelify": "^8.0.0", | ||
"browserify": "^16.2.2", | ||
"intelli-espower-loader": "^1.0.1", | ||
"javascript-csv": "^1.0.7", | ||
"lodash": "^4.17.10" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^5.2.0", | ||
"onchange": "^4.0.0", | ||
"power-assert": "^1.5.0", | ||
"standard": "^11.0.1", | ||
"uglify-js": "^3.4.0" | ||
"standard": "^11.0.1" | ||
}, | ||
@@ -23,19 +20,8 @@ "scripts": { | ||
"lint": "standard --env mocha --fix", | ||
"build": "npm run bundle && npm run minify", | ||
"bundle": "browserify cjt.js -o build/bundle.js --standalone Cjt", | ||
"minify": "uglifyjs --compress --mangle -o build/bundle.min.js -- build/bundle.js", | ||
"prepublish": "npm run test", | ||
"start": "node index.js" | ||
"watch": "onchange '*.json' --delay 1000 'src/*' 'test/*' -- npm run build", | ||
"build": "npm run install && npm run lint && npm test", | ||
"start": "npm run build && npm run watch" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
[ | ||
"babelify", | ||
{ | ||
"presets": [ | ||
"env" | ||
] | ||
} | ||
] | ||
] | ||
"standard": { | ||
"globals": [] | ||
}, | ||
@@ -42,0 +28,0 @@ "repository": { |
# cjt | ||
[![Build Status](https://travis-ci.org/announce/cjt.svg?branch=master)](https://travis-ci.org/announce/cjt) | ||
A library to convert CSV text to Jira's table notation | ||
[![Build Status](https://travis-ci.org/announce/cjt.svg?branch=master)](https://travis-ci.org/announce/cjt) | ||
@@ -10,6 +11,7 @@ ## Usage | ||
const cjt = require('cjt') | ||
csv = | ||
'heading 1,heading 2,heading 3' + | ||
'\ncol A1,col A2,col A3' + | ||
'\ncol B1,col B2,col B3' | ||
csv = ` | ||
heading 1,heading 2,heading 3 | ||
col A1,col A2,col A3 | ||
col B1,col B2,col B3 | ||
` | ||
console.log(cjt.convert(csv)) | ||
@@ -35,1 +37,3 @@ ``` | ||
- [Jira's table notation](https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=tables) | ||
- [RFC 4180 \- Common Format and MIME Type for Comma\-Separated Values \(CSV\) Files](https://tools.ietf.org/html/rfc4180) | ||
'use strict' | ||
const assert = require('assert') | ||
const cjt = require('../cjt') | ||
const cjt = require('../src/cjt') | ||
describe('Conversion', function () { | ||
describe('Conversion', () => { | ||
let csv, jiraTable | ||
beforeEach(() => { | ||
csv = | ||
'heading 1,heading 2,heading 3' + | ||
'\ncol A1,col A2,col A3' + | ||
'\ncol B1,col B2,col B3' | ||
csv = ` | ||
heading 1,heading 2,heading 3 | ||
col A1,col A2,col A3 | ||
col B1,col B2,col B3 | ||
` | ||
jiraTable = | ||
@@ -14,0 +15,0 @@ '||heading 1||heading 2||heading 3||' + |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
4
0
38
3
1
439095
3
97
+ Addedargparse@^1.0.10
+ Addedjavascript-csv@^1.0.7
+ Addedlodash@^4.17.10
+ Addedargparse@1.0.10(transitive)
+ Addedjavascript-csv@1.0.7(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedsprintf-js@1.0.3(transitive)