mirror of
https://github.com/lancedikson/bowser
synced 2026-02-09 17:40:09 +00:00
wip
This commit is contained in:
parent
382bc22397
commit
42a8828eeb
5
.babelrc
5
.babelrc
@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"presets": [["@babel/preset-env", {
|
"presets": [["@babel/preset-env", {
|
||||||
"useBuiltIns": "entry",
|
"useBuiltIns": "entry",
|
||||||
|
"corejs": 3,
|
||||||
"modules": "cjs",
|
"modules": "cjs",
|
||||||
"loose": true,
|
"loose": true,
|
||||||
"targets": {
|
"targets": {
|
||||||
"ie": "8",
|
"ie": "11",
|
||||||
"browsers": ">2%"
|
"browsers": ">0.25%"
|
||||||
}
|
}
|
||||||
}]],
|
}]],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
parser: babel-eslint
|
parserOptions:
|
||||||
|
ecmaVersion: 2020
|
||||||
|
sourceType: module
|
||||||
extends: airbnb-base
|
extends: airbnb-base
|
||||||
rules:
|
rules:
|
||||||
no-underscore-dangle: 0
|
no-underscore-dangle: 0
|
||||||
|
|||||||
2
.github/workflows/merge-to-master.yml
vendored
2
.github/workflows/merge-to-master.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [12.16.3]
|
node-version: [18]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get branch name (merge)
|
- name: Get branch name (merge)
|
||||||
|
|||||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 12.16.3
|
node-version: 18
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
|
|||||||
4
.github/workflows/pull-request.yml
vendored
4
.github/workflows/pull-request.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node: [12.16.3]
|
node: [18]
|
||||||
name: Node ${{ matrix.node }}
|
name: Node ${{ matrix.node }}
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout latest code"
|
- name: "Checkout latest code"
|
||||||
@ -37,7 +37,7 @@ jobs:
|
|||||||
- name: Set up node
|
- name: Set up node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "16"
|
node-version: "18"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Run ESLint
|
- name: Run ESLint
|
||||||
|
|||||||
50
package.json
50
package.json
@ -27,36 +27,38 @@
|
|||||||
"browser": "es5.js",
|
"browser": "es5.js",
|
||||||
"module": "src/bowser.js",
|
"module": "src/bowser.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/bowser-js/bowser.git"
|
"url": "git+https://github.com/bowser-js/bowser.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.11.6",
|
"@babel/cli": "^7.23.0",
|
||||||
"@babel/core": "^7.8.0",
|
"@babel/core": "^7.23.0",
|
||||||
"@babel/polyfill": "^7.8.3",
|
"@babel/preset-env": "^7.23.0",
|
||||||
"@babel/preset-env": "^7.8.2",
|
"@babel/register": "^7.23.0",
|
||||||
"@babel/register": "^7.8.3",
|
|
||||||
"ava": "^3.0.0",
|
"ava": "^3.0.0",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-loader": "^9.1.3",
|
||||||
"babel-loader": "^8.0.6",
|
"babel-plugin-add-module-exports": "^1.0.4",
|
||||||
"babel-plugin-add-module-exports": "^1.0.2",
|
"babel-plugin-istanbul": "^6.1.1",
|
||||||
"babel-plugin-istanbul": "^6.0.0",
|
"compression-webpack-plugin": "^10.0.0",
|
||||||
"compression-webpack-plugin": "^4.0.0",
|
"core-js": "^3.33.0",
|
||||||
"coveralls": "^3.0.6",
|
"coveralls": "^3.1.1",
|
||||||
"docdash": "^1.1.1",
|
"docdash": "^2.0.2",
|
||||||
"eslint": "^6.5.1",
|
"eslint": "^8.53.0",
|
||||||
"eslint-config-airbnb-base": "^13.2.0",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
"eslint-plugin-ava": "^10.0.0",
|
"eslint-plugin-ava": "^14.0.0",
|
||||||
"eslint-plugin-import": "^2.18.2",
|
"eslint-plugin-import": "^2.29.0",
|
||||||
"gh-pages": "^3.0.0",
|
"gh-pages": "^6.1.0",
|
||||||
"jsdoc": "^3.6.3",
|
"jsdoc": "^4.0.2",
|
||||||
"nyc": "^15.0.0",
|
"nyc": "^15.1.0",
|
||||||
"sinon": "^9.0.0",
|
"sinon": "^17.0.1",
|
||||||
"testem": "^3.0.0",
|
"testem": "^3.10.1",
|
||||||
"webpack": "^4.41.0",
|
"webpack": "^5.89.0",
|
||||||
"webpack-bundle-analyzer": "^3.5.2",
|
"webpack-bundle-analyzer": "^4.10.1",
|
||||||
"webpack-cli": "^3.3.9",
|
"webpack-cli": "^5.1.4",
|
||||||
"yamljs": "^0.3.0"
|
"yamljs": "^0.3.0"
|
||||||
},
|
},
|
||||||
"ava": {
|
"ava": {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ module.exports = {
|
|||||||
mode: 'production', // "production" | "development" | "none"
|
mode: 'production', // "production" | "development" | "none"
|
||||||
// Chosen mode tells webpack to use its built-in optimizations accordingly.
|
// Chosen mode tells webpack to use its built-in optimizations accordingly.
|
||||||
entry: {
|
entry: {
|
||||||
bundled: ['@babel/polyfill', './src/bowser.js'],
|
bundled: ['core-js/stable', './src/bowser.js'],
|
||||||
es5: './src/bowser.js',
|
es5: './src/bowser.js',
|
||||||
}, // string | object | array
|
}, // string | object | array
|
||||||
// defaults to ./src
|
// defaults to ./src
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user