Comparing version 2.0.0-alpha.1 to 2.0.0-alpha.2
# Bowser Changelog | ||
### 2.0.0-alpha.2 (July 17, 2018) | ||
- [CHANGE] Make `src/bowser` main file instead of the bundled one | ||
- [CHANGE] Move the bundled file to the root of the package to make it possible to `require('bowser/compiled')` (#231) | ||
- [REMOVE] Remove `typings.d.ts` before stable release (#232) | ||
- [FIX] Improve Nexus devices detection (#233) | ||
### 2.0.0-alpha.1 (July 9, 2018) | ||
@@ -4,0 +10,0 @@ - [ADD] `Bowser.getParser()` |
{ | ||
"name": "bowser", | ||
"version": "2.0.0-alpha.1", | ||
"version": "2.0.0-alpha.2", | ||
"description": "Lightweight browser detector", | ||
@@ -23,4 +23,3 @@ "keywords": [ | ||
], | ||
"main": "./dist/bowser.compiled.js", | ||
"typings": "./typings.d.ts", | ||
"main": "src/bowser.js", | ||
"repository": { | ||
@@ -27,0 +26,0 @@ "type": "git", |
@@ -25,3 +25,3 @@ ## Bowser | ||
``` | ||
```javascript | ||
const bowser = require('bowser'); | ||
@@ -34,3 +34,3 @@ ``` | ||
``` | ||
```javascript | ||
const browser = bowser.getParser(window.navigator.userAgent); | ||
@@ -44,3 +44,3 @@ | ||
``` | ||
```javascript | ||
const impression = new Impression(); | ||
@@ -56,3 +56,3 @@ | ||
``` | ||
```javascript | ||
const browser = bowser.getParser(window.navigator.userAgent); | ||
@@ -88,3 +88,3 @@ impression.userTechData = browser.parse(); | ||
``` | ||
```javascript | ||
const browser = bowser.getParsers(window.navigator.userAgent); | ||
@@ -119,6 +119,7 @@ const isValidBrowser = browser.satisfies({ | ||
# Advanced Usage | ||
By default, `require('bowser')` requires the pre-compiled file, which can | ||
include useless for you polyfills. In case you don't need that, you can choose | ||
using source file requiring bowser like that: `require('bowser/src/bowser`); | ||
Then you get ES2015 file, which is not precompiled and can be easier to debug. | ||
By default, `require('bowser')` requires the *ES6 version of files*, which | ||
**don't** include any polyfills. In case if you don't use your own `babel-polyfill` | ||
you may need to have pre-built bundle with all needed polyfills. | ||
It's possible requiring bowser like that: `require('bowser/compiled');` | ||
As result you get a ES5 file with `babel-polyfill` bundled in it. | ||
@@ -125,0 +126,0 @@ # Contributing |
@@ -17,3 +17,3 @@ import { getFirstMatch } from './utils'; | ||
{ | ||
test: [/nexus\s*[0-9]+/i], | ||
test: [/nexus\s*(?:7|8|9|10).*/i], | ||
describe() { | ||
@@ -91,3 +91,3 @@ return { | ||
{ | ||
test: [/nexus\s*[0-6]\s*/i, /galaxy nexus/i], | ||
test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], | ||
describe() { | ||
@@ -94,0 +94,0 @@ return { |
@@ -12,6 +12,6 @@ const path = require('path'); | ||
// options related to how webpack emits results | ||
path: path.resolve(__dirname, 'dist'), // string | ||
path: path.resolve(__dirname, './'), // string | ||
// the target directory for all output files | ||
// must be an absolute path (use the Node.js path module) | ||
filename: 'bowser.compiled.js', // string | ||
filename: 'compiled.js', // string | ||
// the filename template for entry chunks | ||
@@ -18,0 +18,0 @@ library: 'bowser', |
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
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
139
0
507291
30
2164