browser-headers
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "browser-headers", | ||
"version": "0.4.0", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"version": "0.4.1", | ||
"main": "dist/browser-headers.js", | ||
"browser": "dist/browser-headers.umd.js", | ||
"types": "dist/typings/index.d.ts", | ||
"repository": "https://github.com/improbable-eng/js-browser-headers", | ||
@@ -14,5 +15,5 @@ "license": "Apache-2.0", | ||
"prepublish": "npm run clean && npm run build:lib", | ||
"clean": "rm -rf build/* && rm -rf lib/*", | ||
"clean": "rm -rf build && rm -rf lib && rm -rf dist", | ||
"build:test": "webpack", | ||
"build:lib": "npm run clean && mkdir -p lib && tsc && mkdir -p build/js && cp -R src/js/*.js build/js && cp -R build/* lib", | ||
"build:lib": "npm run clean && webpack", | ||
"lint": "tslint -c ./tslint.json ./src/**/*.ts ./test/**/*.ts", | ||
@@ -29,3 +30,3 @@ "test": "npm run build:test && karma start --single-run", | ||
"jasmine-core": "^2.4.1", | ||
"karma": "^1.2.0", | ||
"karma": "^3.0.0", | ||
"karma-browserstack-launcher": "^1.3.0", | ||
@@ -36,3 +37,3 @@ "karma-jasmine": "^1.0.2", | ||
"tslint": "^4.4.2", | ||
"typescript": "^2.2.1", | ||
"typescript": "3.0.1", | ||
"webpack": "^2.2.1" | ||
@@ -39,0 +40,0 @@ }, |
@@ -5,2 +5,3 @@ # browser-headers | ||
[![Master Build](https://travis-ci.org/improbable-eng/js-browser-headers.svg?branch=master)](https://travis-ci.org/improbable-eng/js-browser-headers) | ||
![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=MVZzVGFiVXpFRjFjRmZ2SUpJaWlGam9Xa2c0R1B6MnVBV25aZm43cDZtUT0tLXZaMDdRR0pVbVFyRVBmd0p1TUNlZVE9PQ==--8b1eb510ef6bde3d6d89b2d65b033a9030f75f6f%) | ||
[![NPM](https://img.shields.io/npm/v/browser-headers.svg)](https://www.npmjs.com/package/browser-headers) | ||
@@ -7,0 +8,0 @@ [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) |
@@ -24,3 +24,3 @@ import { normalizeName, normalizeValue, getHeaderValues, getHeaderKeys, splitHeaderValue } from "./util"; | ||
// isBrowserHeaders is used to check if an argument is an instance of BrowserHeaders from another | ||
// isBrowserHeaders is used to check if an argument is an instance of BrowserHeaders from another | ||
// version of the dependency. | ||
@@ -168,3 +168,3 @@ function isBrowserHeaders(arg: any): arg is BrowserHeaders { | ||
} | ||
toHeaders(): Headers { | ||
@@ -171,0 +171,0 @@ if (typeof Headers !== "undefined") { |
import { WindowHeaders } from "./WindowHeaders"; | ||
import { iterateHeaders, iterateHeadersKeys } from "./js/iterateHeaders"; | ||
import { iterateHeaders, iterateHeadersKeys } from "./iterateHeaders"; | ||
@@ -4,0 +4,0 @@ // Declare that there is a global property named "Headers" - this might not be present at runtime |
@@ -6,3 +6,3 @@ { | ||
"declaration": true, | ||
"declarationDir": "build", | ||
"declarationDir": "typings", | ||
"target": "es5", | ||
@@ -9,0 +9,0 @@ "removeComments": true, |
const path = require('path'); | ||
const packageJson = require("./package.json"); | ||
module.exports = { | ||
entry: "./test/BrowserHeaders.spec.ts", | ||
output: { | ||
path: path.resolve(__dirname, 'test', 'build'), | ||
filename: 'integration-tests.js', | ||
}, | ||
devtool: 'source-map', | ||
const LIB_BASE_CONFIG = { | ||
entry: "./src/index.ts", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
include: /src|test|node_modules/, | ||
loader: 'babel-loader?cacheDirectory' | ||
}, | ||
{ | ||
test: /\.ts$/, | ||
include: /src|test|node_modules/, | ||
loader: "babel-loader?cacheDirectory!ts-loader" | ||
} | ||
] | ||
rules: [{ | ||
test: /\.ts?$/, | ||
use: 'ts-loader', | ||
exclude: /node_modules/ | ||
}] | ||
}, | ||
plugins: [], | ||
resolve: { | ||
extensions: [".ts", ".js"] | ||
} | ||
extensions: ['.ts', '.js'] | ||
}, | ||
}; | ||
const DIST_DIR = path.resolve(__dirname, 'dist'); | ||
module.exports = [{ | ||
name: 'lib-commonjs', | ||
...LIB_BASE_CONFIG, | ||
output: { | ||
filename: `${packageJson.name}.js`, | ||
path: DIST_DIR, | ||
libraryTarget: 'commonjs', | ||
} | ||
}, | ||
{ | ||
name: 'lib-umd', | ||
...LIB_BASE_CONFIG, | ||
output: { | ||
filename: `${packageJson.name}.umd.js`, | ||
path: DIST_DIR, | ||
libraryTarget: 'umd', | ||
} | ||
}, | ||
{ | ||
name: 'tests', | ||
entry: "./test/BrowserHeaders.spec.ts", | ||
output: { | ||
path: path.resolve(__dirname, 'test', 'build'), | ||
filename: 'integration-tests.js', | ||
}, | ||
devtool: 'source-map', | ||
module: { | ||
rules: [{ | ||
test: /\.js$/, | ||
include: /src|test|node_modules/, | ||
loader: 'babel-loader?cacheDirectory' | ||
}, | ||
{ | ||
test: /\.ts$/, | ||
include: /src|test|node_modules/, | ||
loader: "babel-loader?cacheDirectory!ts-loader" | ||
} | ||
] | ||
}, | ||
plugins: [], | ||
resolve: { | ||
extensions: [".ts", ".js"] | ||
} | ||
} | ||
]; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance 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
55644
1166
121
19
2