Merge pull request #21 from runk/semantic-release

feat(core): Semantic release
This commit is contained in:
Dmitry Shirokov 2019-07-12 09:22:12 +10:00 committed by GitHub
commit bcad67258f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6614 additions and 111 deletions

View File

@ -1,5 +1,16 @@
language: node_js
node_js:
- "6"
- "8"
- "10"
- "12"
jobs:
include:
- stage: release
node_js: lts/*
# script: skip
deploy:
provider: script
skip_cleanup: true
script:
- npx semantic-release

View File

@ -1,4 +1,4 @@
Copyright (C) 2018 Dmitry Shirokov
Copyright (C) 2019 Dmitry Shirokov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -17,7 +17,7 @@ npm i chardet
To return the encoding with the highest confidence:
```javascript
var chardet = require('chardet');
chardet.detect(Buffer.alloc('hello there!'));
chardet.detect(Buffer.from('hello there!'));
// or
chardet.detectFile('/path/to/file', function(err, encoding) {});
// or
@ -28,7 +28,7 @@ chardet.detectFileSync('/path/to/file');
To return the full list of possible encodings:
```javascript
var chardet = require('chardet');
chardet.detectAll(Buffer.alloc('hello there!'));
chardet.detectAll(Buffer.from('hello there!'));
// or
chardet.detectFileAll('/path/to/file', function(err, encoding) {});
// or

6678
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "chardet",
"version": "0.7.0",
"version": "0.0.0-development",
"homepage": "https://github.com/runk/node-chardet",
"description": "Character detector",
"keywords": [
@ -20,12 +20,12 @@
"@zevanty"
],
"devDependencies": {
"github-publish-release": "^5.0.0",
"mocha": "^5.2.0"
"mocha": "^6.1.4",
"semantic-release": "^15.13.18"
},
"repository": {
"type": "git",
"url": "git@github.com:runk/node-chardet.git"
"url": "https://github.com/runk/node-chardet.git"
},
"bugs": {
"mail": "deadrunk@gmail.com",
@ -33,7 +33,7 @@
},
"scripts": {
"test": "mocha -R spec --recursive --bail",
"release": "scripts/release"
"semantic-release": "semantic-release"
},
"main": "index.js",
"engine": {

View File

@ -1,16 +0,0 @@
#!/bin/bash
# Exit immediately if a pipeline returns non-zero status
# http://www.gnu.org/software/bash/manual/bashref.html#The-Set-Builtin
set -e
npm test
if [ -n "$npm_config_major" ]; then SEMVER="major"
elif [ -n "$npm_config_patch" ]; then SEMVER="patch"
else SEMVER="minor"; fi
npm version $SEMVER
github-publish-release
git push --follow-tags
npm publish