From 1028dff50fd1858a868e30894f1a6c6606e1132b Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Fri, 31 May 2019 09:49:54 +0100 Subject: [PATCH] fix: update dependencies BREAKING CHANGE: * removed Node v5 support; next supported version: ^10 --- .babelrc | 13 +++++++----- .travis.yml | 6 ++---- LICENSE | 2 +- package.json | 39 +++++++++++++++++++--------------- src/browser.js | 7 ------ test/selectors/typeSelector.js | 3 +-- webpack.config.js | 25 ---------------------- 7 files changed, 34 insertions(+), 61 deletions(-) delete mode 100644 src/browser.js delete mode 100644 webpack.config.js diff --git a/.babelrc b/.babelrc index 605ffdc..45ab014 100644 --- a/.babelrc +++ b/.babelrc @@ -1,12 +1,15 @@ { "plugins": [ - "transform-flow-comments" + "@babel/plugin-transform-flow-strip-types" ], "presets": [ - ["env", { - "targets": { - "node": 5 + [ + "@babel/preset-env", + { + "targets": { + "node": 10 + } } - }] + ] ] } diff --git a/.travis.yml b/.travis.yml index 4b22f57..60d119d 100755 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,8 @@ script: - npm run lint - npm run build after_success: - - export NODE_ENV=production - - rm -fr ./dist - - npm run build - - semantic-release pre && npm publish && semantic-release post + - NODE_ENV=production npm run build + - semantic-release notifications: email: false sudo: false diff --git a/LICENSE b/LICENSE index f6521a0..5065086 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017, Gajus Kuizinas (http://gajus.com/) +Copyright (c) 2019, Gajus Kuizinas (http://gajus.com/) All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/package.json b/package.json index 148f20d..7e1b277 100644 --- a/package.json +++ b/package.json @@ -5,31 +5,36 @@ "url": "http://gajus.com" }, "ava": { - "babel": "inherit", "require": [ - "babel-register" + "@babel/register" ] }, "dependencies": { - "nearley": "^2.11.0" + "nearley": "^2.16.0" }, "description": "A CSS selector parser.", "devDependencies": { - "ava": "^0.23.0", - "babel-cli": "^6.26.0", - "babel-loader": "^7.1.2", - "babel-plugin-transform-flow-comments": "^6.22.0", - "babel-preset-env": "^1.6.1", - "babel-register": "^6.26.0", - "eslint": "^4.10.0", - "eslint-config-canonical": "^9.3.1", - "flow-bin": "^0.57.3", - "husky": "^0.14.3", - "semantic-release": "^8.2.0", - "webpack": "^3.8.1" + "@babel/cli": "^7.4.4", + "@babel/core": "^7.4.5", + "@babel/plugin-transform-flow-strip-types": "^7.4.4", + "@babel/preset-env": "^7.4.5", + "@babel/preset-flow": "^7.0.0", + "@babel/register": "^7.4.4", + "ava": "^1.4.1", + "eslint": "^5.16.0", + "eslint-config-canonical": "^17.1.0", + "flow-bin": "^0.99.1", + "flow-copy-source": "^2.0.6", + "husky": "^2.3.0", + "semantic-release": "^15.13.12" }, "engines": { - "node": ">=5" + "node": ">=10" + }, + "husky": { + "hooks": { + "pre-commit": "npm run lint && npm run test && npm run build" + } }, "keywords": [ "css", @@ -44,7 +49,7 @@ "url": "https://github.com/gajus/scalpel" }, "scripts": { - "build": "npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps", + "build": "rm -fr ./dist && npm run compile-grammar && babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist", "compile-grammar": "nearleyc ./src/grammar.ne --out ./src/grammar.js", "lint": "eslint ./src ./test && flow", "precommit": "npm run lint && npm run test", diff --git a/src/browser.js b/src/browser.js deleted file mode 100644 index 7776912..0000000 --- a/src/browser.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow - -import createParser from './createParser'; - -window.Scalpel = { - createParser -}; diff --git a/test/selectors/typeSelector.js b/test/selectors/typeSelector.js index 6304174..24e760e 100644 --- a/test/selectors/typeSelector.js +++ b/test/selectors/typeSelector.js @@ -10,8 +10,7 @@ const validNodeNames = [ 'foo-123', 'FOO', 'foo-bar', - '_0', - 'foo-123' + '_0' ]; for (const validNodeName of validNodeNames) { diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 27994fd..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,25 +0,0 @@ -/* eslint-disable */ - -const path = require('path'); -const webpack = require('webpack'); - -module.exports = { - entry: path.resolve(__dirname, 'src/browser'), - output: { - path: path.resolve(__dirname, 'demo'), - filename: 'scalpel.js' - }, - module: { - rules: [ - { - test: /\.js$/, - include: path.resolve(__dirname, 'src'), - use: [ - { - loader: 'babel-loader' - } - ] - } - ] - } -};