diff --git a/package.json b/package.json index 44f3a0934..10833dfbc 100644 --- a/package.json +++ b/package.json @@ -18,30 +18,30 @@ "@verdaccio/file-locking": "0.0.7", "@verdaccio/local-storage": "1.1.3", "@verdaccio/streams": "1.0.0", - "JSONStream": "1.3.2", + "JSONStream": "1.3.3", "asciidoctor.js": "1.5.6", - "async": "2.6.0", - "body-parser": "1.18.2", + "async": "2.6.1", + "body-parser": "1.18.3", "bunyan": "1.8.12", "chalk": "2.4.1", - "commander": "2.15.0", - "compression": "1.7.2", + "commander": "2.16.0", + "compression": "1.7.3", "cookies": "0.7.1", "cors": "2.8.4", "date-fns": "1.29.0", "express": "4.16.3", "global": "4.3.2", "handlebars": "4.0.11", - "http-errors": "1.6.2", + "http-errors": "1.6.3", "js-base64": "2.4.8", "js-string-escape": "1.0.1", - "js-yaml": "3.11.0", - "jsonwebtoken": "8.2.1", - "lockfile": "1.0.3", + "js-yaml": "3.12.0", + "jsonwebtoken": "8.3.0", + "lockfile": "1.0.4", "lodash": "4.17.10", "lunr": "0.7.0", - "marked": "0.3.17", - "mime": "2.2.0", + "marked": "0.4.0", + "mime": "2.3.1", "minimatch": "3.0.4", "mkdirp": "0.5.1", "pkginfo": "0.4.1", @@ -51,23 +51,23 @@ "verdaccio-htpasswd": "0.2.2" }, "devDependencies": { - "@commitlint/cli": "6.1.3", - "@commitlint/config-conventional": "6.1.3", + "@commitlint/cli": "7.0.0", + "@commitlint/config-conventional": "7.0.1", "@verdaccio/types": "3.4.2", "babel-cli": "6.26.0", - "babel-core": "6.26.0", - "babel-eslint": "8.2.2", - "babel-jest": "23.2.0", - "babel-loader": "7.1.4", + "babel-core": "6.26.3", + "babel-eslint": "8.2.6", + "babel-jest": "23.4.0", + "babel-loader": "7.1.5", "babel-plugin-flow-runtime": "0.17.0", "babel-plugin-syntax-dynamic-import": "6.18.0", "babel-plugin-transform-async-to-generator": "6.24.1", "babel-plugin-transform-class-properties": "6.24.1", - "babel-plugin-transform-decorators-legacy": "1.3.4", + "babel-plugin-transform-decorators-legacy": "1.3.5", "babel-plugin-transform-es2015-classes": "6.24.1", "babel-plugin-transform-runtime": "6.23.0", "babel-polyfill": "6.26.0", - "babel-preset-env": "1.6.1", + "babel-preset-env": "1.7.0", "babel-preset-es2015": "6.24.1", "babel-preset-es2015-node4": "2.1.1", "babel-preset-flow": "6.23.0", @@ -76,23 +76,23 @@ "babel-preset-stage-3": "6.24.1", "babel-register": "6.26.0", "babel-runtime": "6.26.0", - "codecov": "3.0.2", - "cross-env": "5.1.4", + "codecov": "3.0.4", + "cross-env": "5.2.0", "css-loader": "0.28.10", "element-react": "1.4.8", "element-theme-default": "1.4.13", "enzyme": "3.3.0", "enzyme-adapter-react-16": "1.1.1", - "eslint": "5.0.1", + "eslint": "5.2.0", "eslint-config-google": "0.9.1", - "eslint-loader": "2.0.0", - "eslint-plugin-babel": "4.1.2", - "eslint-plugin-flowtype": "2.49.3", + "eslint-loader": "2.1.0", + "eslint-plugin-babel": "5.1.0", + "eslint-plugin-flowtype": "2.50.0", "eslint-plugin-import": "2.13.0", - "eslint-plugin-jest": "21.17.0", + "eslint-plugin-jest": "21.18.0", "eslint-plugin-react": "7.10.0", "file-loader": "1.1.11", - "flow-bin": "0.76.0", + "flow-bin": "0.77.0", "flow-runtime": "0.17.0", "friendly-errors-webpack-plugin": "1.7.0", "github-markdown-css": "2.10.0", @@ -100,16 +100,16 @@ "husky": "0.15.0-rc.8", "identity-obj-proxy": "3.0.0", "in-publish": "2.0.0", - "jest": "23.2.0", - "jest-environment-jsdom": "23.2.0", + "jest": "23.4.1", + "jest-environment-jsdom": "23.4.0", "jest-environment-jsdom-global": "1.1.0", - "jest-environment-node": "23.2.0", + "jest-environment-node": "23.4.0", "localstorage-memory": "1.0.2", - "mini-css-extract-plugin": "0.4.0", - "node-mocks-http": "1.6.7", - "node-sass": "4.9.0", + "mini-css-extract-plugin": "0.4.1", + "node-mocks-http": "1.7.0", + "node-sass": "4.9.2", "normalize.css": "8.0.0", - "optimize-css-assets-webpack-plugin": "4.0.1", + "optimize-css-assets-webpack-plugin": "5.0.0", "ora": "1.4.0", "prop-types": "15.6.1", "puppeteer": "1.1.1", @@ -121,22 +121,22 @@ "rimraf": "2.6.2", "sass-loader": "6.0.7", "source-map-loader": "0.2.3", - "standard-version": "4.3.0", - "style-loader": "0.20.3", - "stylelint": "9.1.1", - "stylelint-config-recommended-scss": "3.1.0", + "standard-version": "4.4.0", + "style-loader": "0.21.0", + "stylelint": "9.4.0", + "stylelint-config-recommended-scss": "3.2.0", "stylelint-scss": "2.5.0", - "stylelint-webpack-plugin": "0.10.4", - "supertest": "3.0.0", + "stylelint-webpack-plugin": "0.10.5", + "supertest": "3.1.0", "url-loader": "0.6.2", "verdaccio-auth-memory": "0.0.4", - "verdaccio-memory": "1.0.1", - "webpack": "4.10.2", + "verdaccio-memory": "1.0.3", + "webpack": "4.16.3", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.0.1", - "webpack-dev-server": "3.1.4", - "webpack-merge": "4.1.2", - "whatwg-fetch": "2.0.3" + "webpack-cli": "3.1.0", + "webpack-dev-server": "3.1.5", + "webpack-merge": "4.1.3", + "whatwg-fetch": "2.0.4" }, "keywords": [ "private", diff --git a/test/functional/basic/basic.js b/test/functional/basic/basic.js index b96c0db66..cede6098b 100644 --- a/test/functional/basic/basic.js +++ b/test/functional/basic/basic.js @@ -20,8 +20,8 @@ function getPackage(name) { export default function(server: any, server2: any) { describe('basic test endpoints', () => { - const PKG_NAME:string = 'testpkg'; - const PKG_VERSION:string = '0.0.1'; + const PKG_NAME: string = 'testpkg'; + const PKG_VERSION: string = '0.0.1'; beforeAll(function() { return server.auth(CREDENTIALS.user, CREDENTIALS.password) diff --git a/test/unit/api/__snapshots__/utils.spec.js.snap b/test/unit/api/__snapshots__/utils.spec.js.snap index dfe37c2bc..2a7630c03 100644 --- a/test/unit/api/__snapshots__/utils.spec.js.snap +++ b/test/unit/api/__snapshots__/utils.spec.js.snap @@ -1,52 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Utilities parseReadme should pass for ascii/makrdown text to html template 1`] = ` -"

Project Title

-

One Paragraph of project description goes here

-

Getting Started

-

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

-

Prerequisites

-

What things you need to install the software and how to install them

-
Give examples
-

Installing

-

A step by step series of examples that tell you how to get a development env running

-

Say what the step will be

-
Give the example
-

And repeat

-
until finished
-

End with an example of getting some data out of the system or using it for a little demo

-

Running the tests

-

Explain how to run the automated tests for this system

-

Break down into end to end tests

-

Explain what these tests test and why

-
Give an example
-

And coding style tests

-

Explain what these tests test and why

-
Give an example
-

Deployment

-

Add additional notes about how to deploy this on a live system

-

Built With

- -

Contributing

-

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

-

Versioning

-

We use SemVer for versioning. For the versions available, see the tags on this repository.

-

License

-

This project is licensed under the MIT License - see the LICENSE.md file for details

-

Acknowledgments

- -" -`; - -exports[`Utilities parseReadme should pass for ascii/makrdown text to html template 2`] = ` +exports[`Utilities parseReadme should pass for ascii text to html template 1`] = ` "

Hello, AsciiDoc!

@@ -76,3 +30,44 @@ exports[`Utilities parseReadme should pass for ascii/makrdown text to html templ
" `; + +exports[`Utilities parseReadme should pass for makrdown text to html template 1`] = ` +"

Project Title

+

One Paragraph of project description goes here

+

Getting Started

+

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

+

Prerequisites

+

What things you need to install the software and how to install them

+
Give examples

Installing

+

A step by step series of examples that tell you how to get a development env running

+

Say what the step will be

+
Give the example

And repeat

+
until finished

End with an example of getting some data out of the system or using it for a little demo

+

Running the tests

+

Explain how to run the automated tests for this system

+

Break down into end to end tests

+

Explain what these tests test and why

+
Give an example

And coding style tests

+

Explain what these tests test and why

+
Give an example

Deployment

+

Add additional notes about how to deploy this on a live system

+

Built With

+ +

Contributing

+

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

+

Versioning

+

We use SemVer for versioning. For the versions available, see the tags on this repository.

+

License

+

This project is licensed under the MIT License - see the LICENSE.md file for details

+

Acknowledgments

+ +" +`; diff --git a/test/unit/api/up-storage.spec.js b/test/unit/api/up-storage.spec.js index 66d6231a8..ea8ecb17f 100644 --- a/test/unit/api/up-storage.spec.js +++ b/test/unit/api/up-storage.spec.js @@ -80,7 +80,7 @@ describe('UpStorge', () => { describe('UpStorge::fetchTarball', () => { test('should fetch a tarball from uplink', (done) => { const proxy = generateProxy(); - const tarball:string = `http://${DOMAIN_SERVERS}:${mockServerPort}/jquery/-/jquery-1.5.1.tgz`; + const tarball: string = `http://${DOMAIN_SERVERS}:${mockServerPort}/jquery/-/jquery-1.5.1.tgz`; const stream = proxy.fetchTarball(tarball); stream.on('error', function(err) { @@ -97,7 +97,7 @@ describe('UpStorge', () => { test('should throw a 404 on fetch a tarball from uplink', (done) => { const proxy = generateProxy(); - const tarball:string = `http://${DOMAIN_SERVERS}:${mockServerPort}/jquery/-/no-exist-1.5.1.tgz`; + const tarball: string = `http://${DOMAIN_SERVERS}:${mockServerPort}/jquery/-/no-exist-1.5.1.tgz`; const stream = proxy.fetchTarball(tarball); stream.on('error', function(err) { @@ -117,7 +117,7 @@ describe('UpStorge', () => { test('should be offline uplink', (done) => { const proxy = generateProxy(); - const tarball:string = 'http://404.verdaccioo.com'; + const tarball: string = 'http://404.verdaccioo.com'; const stream = proxy.fetchTarball(tarball); expect(proxy.failed_requests).toBe(0); diff --git a/test/unit/api/utils.spec.js b/test/unit/api/utils.spec.js index 0b8523c18..0a1576c49 100644 --- a/test/unit/api/utils.spec.js +++ b/test/unit/api/utils.spec.js @@ -118,16 +118,19 @@ describe('Utilities', () => { }); describe('parseReadme', () => { - test('should pass for ascii/makrdown text to html template', () => { - const markdown = '# markdown'; + test('should pass for ascii text to html template', () => { const ascii = "= AsciiDoc"; - expect(parseReadme('testPackage', markdown)).toEqual('

markdown

\n'); expect(parseReadme('testPackage', ascii)).toEqual('

AsciiDoc

\n'); - expect(parseReadme('testPackage', String(readmeFile('markdown.md')))).toMatchSnapshot(); expect(parseReadme('testPackage', String(readmeFile('ascii.adoc')))).toMatchSnapshot(); }); + test('should pass for makrdown text to html template', () => { + const markdown = '# markdown'; + expect(parseReadme('testPackage', markdown)).toEqual('

markdown

\n'); + expect(parseReadme('testPackage', String(readmeFile('markdown.md')))).toMatchSnapshot(); + }); + test('should pass for conversion of non-ascii to markdown text', () => { const simpleText = 'simple text'; const randomText = '%%%%%**##=='; diff --git a/yarn.lock b/yarn.lock index 6b70bbd4c..e444e0ae5 100644 Binary files a/yarn.lock and b/yarn.lock differ