contentful
Advanced tools
Comparing version 4.6.2 to 4.6.3
119
package.json
@@ -1,118 +0,1 @@ | ||
{ | ||
"name": "contentful", | ||
"description": "Client for Contentful's Content Delivery API", | ||
"version": "4.6.2", | ||
"homepage": "https://www.contentful.com/developers/documentation/content-delivery-api/", | ||
"main": "./dist/contentful.node.js", | ||
"module": "./dist/es6-modules/contentful.js", | ||
"jsnext:main": "./dist/es6-modules/contentful.js", | ||
"browser": "./dist/contentful.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/contentful/contentful.js.git" | ||
}, | ||
"author": "Contentful <opensource@contentful.com>", | ||
"license": "MIT", | ||
"tonicExampleFilename": "tonic-example.js", | ||
"scripts": { | ||
"clean": "rimraf dist && rimraf coverage", | ||
"build": "npm run clean && npm run build:ci", | ||
"build:ci": "npm run vendor:version && npm run build:standalone && npm run build:modules", | ||
"build:standalone": "BABEL_ENV=webpack webpack && BABEL_ENV=webpack NODE_ENV=production webpack", | ||
"build:standalone:log": "BABEL_ENV=webpack npm run build && BABEL_ENV=webpack NODE_ENV=production webpack --json --profile > webpack-build-log.json", | ||
"build:modules": "BABEL_ENV=webpack babel lib -d dist/es6-modules && cp ./version.js ./dist/version.js", | ||
"docs:build": "jsdoc -c jsdoc.json", | ||
"docs:dev": "npm run build && npm run docs:build", | ||
"docs:watch": "nodemon --exec npm run docs:dev -w lib", | ||
"docs:publish": "npm run docs:build && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful.js contentful", | ||
"lint": "eslint lib test", | ||
"pretest": "npm run lint", | ||
"test:ci": "npm run build && ./node_modules/contentful-sdk-core/bin/test-ci.sh", | ||
"test:cover": "BABEL_ENV=test babel-node ./node_modules/istanbul/lib/cli.js cover test/runner", | ||
"test:only": "BABEL_ENV=test babel-node ./test/runner", | ||
"test:debug": "BABEL_ENV=test babel-node debug ./test/runner", | ||
"test:integration": "BABEL_ENV=test babel-node ./test/integration/tests.js", | ||
"test:integration-debug": "BABEL_ENV=test babel-node debug ./test/integration/tests.js", | ||
"test:browser-local": "BABEL_ENV=test karma start karma.conf.local.js", | ||
"test:browser-remote": "BABEL_ENV=test karma start karma.conf.saucelabs.js", | ||
"test:simulate-ci": "trevor", | ||
"vendor:version": "echo \"module.exports = '`cat package.json|json version`'\" > version.js", | ||
"browser-coverage": "npm run test:cover && opener coverage/lcov-report/index.html", | ||
"prepublish": "in-publish && npm run build:ci || not-in-publish", | ||
"postpublish": "npm run docs:publish && npm run clean", | ||
"test": "npm run test:cover && npm run test:integration && npm run test:browser-local", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"devdep:build": "pushd ../contentful-sdk-core && npm run build && popd", | ||
"devdep:clean": "pushd ../contentful-sdk-core && npm run clean && popd", | ||
"devdep:install": "npm run devdep:build && rm -rf node_modules/contentful-sdk-core && npm install ../contentful-sdk-core && npm run devdep:clean", | ||
"devdep:uninstall": "npm run devdep:clean && rimraf node_modules/contentful-sdk-core", | ||
"precommit": "npm run lint", | ||
"prepush": "npm run test:only" | ||
}, | ||
"types": "./index.d.ts", | ||
"files": [ | ||
"index.js", | ||
"version.js", | ||
"index.d.ts", | ||
"dist", | ||
"tonic-example.js" | ||
], | ||
"dependencies": { | ||
"axios": "~0.15.3", | ||
"contentful-sdk-core": "^3.14.1", | ||
"es6-promise": "^4.0.5", | ||
"json-stringify-safe": "^5.0.1", | ||
"lodash": "^4.17.4" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.7.5", | ||
"babel-core": "^6.22.1", | ||
"babel-eslint": "^7.1.1", | ||
"babel-loader": "^6.2.4", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-plugin-rewire": "^1.0.0", | ||
"babel-plugin-transform-object-assign": "^6.22.0", | ||
"babel-plugin-transform-runtime": "^6.7.5", | ||
"babel-preset-env": "^1.1.8", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-register": "^6.7.2", | ||
"babel-template": "^6.22.0", | ||
"babel-types": "^6.22.0", | ||
"blue-tape": "^1.0.0", | ||
"contentful-sdk-jsdoc": "^2.2.0", | ||
"coveralls": "^2.11.9", | ||
"cz-conventional-changelog": "^1.1.6", | ||
"eslint": "^3.16.0", | ||
"eslint-config-standard": "^6.2.1", | ||
"eslint-plugin-promise": "^3.4.2", | ||
"eslint-plugin-standard": "^2.0.1", | ||
"husky": "^0.13.1", | ||
"in-publish": "^2.0.0", | ||
"istanbul": "^1.0.0-alpha.2", | ||
"jsdoc": "^3.4.0", | ||
"json": "^9.0.3", | ||
"karma": "^1.4.1", | ||
"karma-babel-preprocessor": "^6.0.1", | ||
"karma-chrome-launcher": "^2.0.0", | ||
"karma-sauce-launcher": "^1.1.0", | ||
"karma-tap": "^3.1.1", | ||
"karma-webpack": "^2.0.2", | ||
"lodash-webpack-plugin": "^0.11.2", | ||
"mkdirp": "^0.5.1", | ||
"nodemon": "^1.11.0", | ||
"require-all": "^2.2.0", | ||
"rimraf": "^2.6.0", | ||
"semantic-release": "^6.3.2", | ||
"sinon": "^2.0.0-pre", | ||
"trevor": "^2.2.0", | ||
"webpack": "^2.2.1" | ||
}, | ||
"engines": { | ||
"node": ">=4.7.2" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} | ||
{"name":"contentful","description":"Client for Contentful's Content Delivery API","version":"4.6.3","homepage":"https://www.contentful.com/developers/documentation/content-delivery-api/","main":"./dist/contentful.node.js","module":"./dist/es-modules/contentful.js","jsnext:main":"./dist/es-modules/contentful.js","repository":{"type":"git","url":"https://github.com/contentful/contentful.js.git"},"author":"Contentful <opensource@contentful.com>","license":"MIT","tonicExampleFilename":"tonic-example.js","scripts":{"clean":"rimraf dist","build":"npm run clean && npm run build:modules && npm run build:standalone","build:modules":"BABEL_ENV=modules babel lib -d dist/es-modules/","build:standalone":"webpack && NODE_ENV=production webpack","build:standalone:log":"NODE_ENV=production WEBPACK_MODE=log webpack --json --profile --progress > webpack-build-log.json && webpack-bundle-analyzer webpack-build-log.json","docs:build":"jsdoc -c jsdoc.json","docs:dev":"npm run build && npm run docs:build","docs:watch":"nodemon --exec npm run docs:dev -w lib","docs:publish":"npm run docs:build && ./node_modules/contentful-sdk-jsdoc/bin/publish-docs.sh contentful.js contentful","lint":"eslint lib test","pretest":"rimraf coverage && npm run lint","test":"npm run test:cover && npm run test:integration && npm run test:browser-local && npm run test:size","test:ci":"npm run build && ./node_modules/contentful-sdk-core/bin/test-ci.sh","test:cover":"BABEL_ENV=test babel-node ./node_modules/istanbul/lib/cli.js cover ./test/runner | tap-spec","test:unit":"BABEL_ENV=test babel-node ./test/runner | tap-spec","test:debug":"BABEL_ENV=test babel-node debug ./test/runner","test:integration":"BABEL_ENV=test babel-node ./test/integration/tests.js | tap-spec","test:integration-debug":"BABEL_ENV=test babel-node debug ./test/integration/tests.js","test:browser-local":"BABEL_ENV=test karma start karma.conf.local.js","test:browser-remote":"BABEL_ENV=test karma start karma.conf.saucelabs.js","test:e2e":"node test/e2e/index.js","test:simulate-ci":"trevor","test:size":"bundlesize","browser-coverage":"npm run test:cover && opener coverage/lcov-report/index.html","prepublish":"in-publish && npm run build || not-in-publish","postpublish":"npm run docs:publish && npm run clean","semantic-release":"semantic-release pre && npm publish && semantic-release post","devdep:build":"pushd ../contentful-sdk-core && npm run build && popd","devdep:clean":"pushd ../contentful-sdk-core && npm run clean && popd","devdep:install":"npm run devdep:build && rm -rf node_modules/contentful-sdk-core && npm install ../contentful-sdk-core && npm run devdep:clean","devdep:uninstall":"npm run devdep:clean && rimraf node_modules/contentful-sdk-core","precommit":"npm run lint","prepush":"npm run test:unit"},"types":"./index.d.ts","files":["index.js","version.js","index.d.ts","dist","tonic-example.js"],"dependencies":{"axios":"contentful/axios#fix/https-via-http-proxy","contentful-sdk-core":"^5.0.0","json-stringify-safe":"^5.0.1","lodash":"^4.17.4"},"devDependencies":{"babel-cli":"^6.7.5","babel-core":"^6.22.1","babel-eslint":"^7.1.1","babel-loader":"^7.1.1","babel-plugin-inline-replace-variables":"^1.3.1","babel-plugin-lodash":"^3.2.11","babel-plugin-rewire":"^1.0.0","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-env":"^1.1.8","babili-webpack-plugin":"^0.1.2","blue-tape":"^1.0.0","bundlesize":"^0.12.0","contentful-sdk-jsdoc":"^2.2.0","core-js":"^2.5.1","coveralls":"^2.11.9","cz-conventional-changelog":"^2.0.0","eslint":"^4.2.0","eslint-config-standard":"^10.2.1","eslint-plugin-import":"^2.7.0","eslint-plugin-node":"^5.1.0","eslint-plugin-promise":"^3.4.2","eslint-plugin-standard":"^3.0.1","express":"^4.15.4","husky":"^0.14.3","in-publish":"^2.0.0","istanbul":"^1.0.0-alpha.2","jsdoc":"^3.4.0","karma":"^1.4.1","karma-chrome-launcher":"^2.0.0","karma-firefox-launcher":"^1.0.1","karma-sauce-launcher":"^1.1.0","karma-tap":"^3.1.1","karma-webpack":"^2.0.2","lodash-webpack-plugin":"^0.11.4","mkdirp":"^0.5.1","nodemon":"^1.11.0","require-all":"^2.2.0","rimraf":"^2.6.0","selenium-webdriver":"^3.5.0","semantic-release":"^8.2.0","sinon":"^2.0.0-pre","tap-spec":"^4.1.1","trevor":"^2.2.0","webpack":"^3.3.0","webpack-bundle-analyzer":"^2.8.3"},"engines":{"node":">=4.7.2"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"bundlesize":[{"path":"./dist/contentful.browser.js","maxSize":"38Kb"},{"path":"./dist/contentful.browser.min.js","maxSize":"14Kb"},{"path":"./dist/contentful.legacy.js","maxSize":"56Kb"},{"path":"./dist/contentful.legacy.min.js","maxSize":"22Kb"},{"path":"./dist/contentful.node.js","maxSize":"48Kb"},{"path":"./dist/contentful.node.min.js","maxSize":"19Kb"}]} |
@@ -14,2 +14,4 @@ # contentful.js | ||
[![npm downloads](https://img.shields.io/npm/dm/contentful.svg)](http://npm-stat.com/charts.html?package=contentful) | ||
[![gzip bundle size](http://img.badgesize.io/https://unpkg.com/contentful/dist/contentful.browser.min.js?compression=gzip | ||
)](https://unpkg.com/contentful/dist/contentful.browser.min.js) | ||
@@ -30,3 +32,3 @@ [Contentful](https://www.contentful.com) is a content management platform for web applications, mobile apps and connected devices. It allows you to create, edit & manage content in the cloud and publish it anywhere via a powerful API. Contentful offers tools for managing editorial teams and enabling cooperation between organizations. | ||
- Edge | ||
- IE11 (with [es6-promise](https://github.com/stefanpenner/es6-promise) polyfill applied) | ||
- IE11 (with [legacy version](#legacy-browsers) of the library) | ||
- Safari | ||
@@ -49,7 +51,8 @@ - node.js (4.x, 6.x) | ||
- [Documentation/References](#documentationreferences) | ||
## Installation | ||
In node, using [npm](http://npmjs.org): | ||
### Node: | ||
Using [npm](http://npmjs.org): | ||
``` sh | ||
@@ -59,8 +62,16 @@ npm install contentful | ||
Or, if you'd like to use a standalone built file you can use the following script tag or just download it from [unpkg](https://unpkg.com), under the `dist` directory: | ||
Using [yarn](https://yarnpkg.com/lang/en/): | ||
``` sh | ||
yarn add contentful | ||
``` | ||
### Browser: | ||
If you'd like to use a standalone built file you can use the following script tag or download it from [unpkg](https://unpkg.com), under the `dist` directory: | ||
``` html | ||
<script src="https://unpkg.com/contentful@latest/dist/contentful.min.js"></script> | ||
<script src="https://unpkg.com/contentful@latest/dist/contentful.browser.min.js"></script> | ||
``` | ||
**It is not recommended to use the above URL for production.** | ||
**It's not recommended to use the above URL for production.** | ||
@@ -70,7 +81,15 @@ Using `contentful@latest` will always get you the latest version, but you can also specify a specific version number: | ||
``` html | ||
<script src="https://unpkg.com/contentful@4.1.1/dist/contentful.min.js"></script> | ||
<script src="https://unpkg.com/contentful@4.1.1/dist/contentful.browser.min.js"></script> | ||
``` | ||
The Contentful Delivery SDK will be accessible via the `contentful` global variable. | ||
Check the [releases](https://github.com/contentful/contentful.js/releases) page to know which versions are available. | ||
### Legacy browsers: | ||
This library also comes with a legacy version to support Internet Explorer 11 and other older browsers. It already contains a polyfill for Promises. | ||
To support legacy browsers in your application, use `contentful.legacy.min.js` instead of `contentful.browser.min.js` | ||
## Authentication | ||
@@ -267,3 +286,6 @@ | ||
#### headers (default: `[]`) | ||
#### httpsAgent (default: `undefined`) | ||
Custom agent to perform HTTPS requests. Find further information in the [axios request config documentation](https://github.com/mzabriskie/axios#request-config). | ||
#### headers (default: `{}`) | ||
Additional headers to attach to the requests. We add/overwrite the following headers: | ||
@@ -275,2 +297,5 @@ | ||
#### proxy (default: `undefined`) | ||
Axios proxy configuration. See the [axios request config documentation](https://github.com/mzabriskie/axios#request-config) for further information about the supported values. | ||
#### resolveLinks (default: `true`) | ||
@@ -282,2 +307,4 @@ Turn off to disable link resolving. | ||
#### logHandler (default: `function (level, data) {}`) | ||
Errors and warnings will be logged by default to the node or browser console. Pass your own log handler to intercept here and handle errors, warnings and info on your own. | ||
@@ -314,2 +341,8 @@ ### Reference documentation | ||
## Migration from contentful.js 4.x | ||
The bundle for browsers is now called `contentful.browser.min.js` to mark it clearly as browser only bundle. If you need to support IE 11 or other old browsers, you may use the `contentful.legacy.min.js`. Node will automatically use the `contentful.node.min.js` while bundlers like Webpack will resolve to the new ES-modules version of the library. | ||
No changes to the API of the library were made. | ||
## Migration from contentful.js 3.x | ||
@@ -316,0 +349,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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 2 instances 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 3 instances in 1 package
1640109
4
25
361
20
10
45
19301
1
+ Addedcontentful-sdk-core@5.0.4(transitive)
- Removedes6-promise@^4.0.5
- Removedansi-regex@2.1.1(transitive)
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedaxios@0.15.3(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedconsole-control-strings@1.1.0(transitive)
- Removedcontentful-sdk-core@3.14.4(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddelegates@1.0.0(transitive)
- Removedes6-promise@4.2.8(transitive)
- Removedfollow-redirects@1.0.0(transitive)
- Removedgauge@2.7.4(transitive)
- Removedhas-unicode@2.0.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedms@2.0.0(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedwide-align@1.1.5(transitive)
Updatedcontentful-sdk-core@^5.0.0