feat(core): Semantic release

This commit is contained in:
Dmitry Shirokov 2019-07-12 09:12:00 +10:00
parent 5156e3063a
commit 14b78975bd
6 changed files with 6614 additions and 111 deletions

View File

@ -1,5 +1,16 @@
language: node_js language: node_js
node_js: node_js:
- "6"
- "8" - "8"
- "10" - "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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal 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: To return the encoding with the highest confidence:
```javascript ```javascript
var chardet = require('chardet'); var chardet = require('chardet');
chardet.detect(Buffer.alloc('hello there!')); chardet.detect(Buffer.from('hello there!'));
// or // or
chardet.detectFile('/path/to/file', function(err, encoding) {}); chardet.detectFile('/path/to/file', function(err, encoding) {});
// or // or
@ -28,7 +28,7 @@ chardet.detectFileSync('/path/to/file');
To return the full list of possible encodings: To return the full list of possible encodings:
```javascript ```javascript
var chardet = require('chardet'); var chardet = require('chardet');
chardet.detectAll(Buffer.alloc('hello there!')); chardet.detectAll(Buffer.from('hello there!'));
// or // or
chardet.detectFileAll('/path/to/file', function(err, encoding) {}); chardet.detectFileAll('/path/to/file', function(err, encoding) {});
// or // or

6678
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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