Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hexojs/hexo-deployer-heroku
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: hexojs/hexo-deployer-heroku
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 4 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 6, 2023

  1. Bump actions/checkout from 3 to 4 (#128)

    Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4640d56 View commit details

Commits on Sep 22, 2023

  1. Copy the full SHA
    b8e4365 View commit details

Commits on Oct 26, 2023

  1. Bump actions/setup-node from 3 to 4 (#134)

    Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
    - [Release notes](https://github.com/actions/setup-node/releases)
    - [Commits](actions/setup-node@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-node
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 26, 2023
    Copy the full SHA
    ef1de8c View commit details

Commits on Apr 9, 2024

  1. Bump eslint from 8.57.0 to 9.0.0 (#138)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.0.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.57.0...v9.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 9, 2024
    Copy the full SHA
    9cf4cdc View commit details
Showing with 38 additions and 6 deletions.
  1. +4 −4 .github/workflows/tester.yml
  2. +3 −2 package.json
  3. +31 −0 test/index.js
8 changes: 4 additions & 4 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@ jobs:
node-version: ['14.x', '16.x', '18.x', '20.x']
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
@@ -31,9 +31,9 @@ jobs:
os: [ubuntu-latest]
node-version: ['14.x']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -33,10 +33,11 @@
"devDependencies": {
"bluebird": "^3.7.2",
"chai": "^4.3.4",
"eslint": "^8.6.0",
"eslint": "^9.0.0",
"eslint-config-hexo": "^5.0.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0"
"nyc": "^15.1.0",
"sinon": "^15.2.0"
},
"dependencies": {
"hexo-fs": "^4.1.1",
31 changes: 31 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -4,13 +4,16 @@ require('chai').should(); // eslint-disable-line
const pathFn = require('path');
const { spawn } = require('hexo-util');
const fs = require('hexo-fs');
const { stub, assert: sinonAssert } = require('sinon');
const { underline } = require('picocolors');
const Promise = require('bluebird');

const assetDir = pathFn.join(__dirname, '../assets');

describe('Heroku deployer', () => {
const baseDir = pathFn.join(__dirname, 'deployer_test');
const publicDir = pathFn.join(baseDir, 'public');
const deployDir = pathFn.join(baseDir, '.deploy_heroku');
const fakeRemote = pathFn.join(baseDir, 'remote');
const validateDir = pathFn.join(baseDir, 'validate');

@@ -95,4 +98,32 @@ describe('Heroku deployer', () => {
content.should.eql('custom message');
});
});

it('without repo and repository', () => {
fs.mkdirSync(validateDir);
const logStub = stub(console, 'log');
process.env.HEXO_DEPLOYER_REPO = '';
deployer({});
let help = '';
help += 'You have to configure the deployment settings in _config.yml first!\n\n';
help += 'Example:\n';
help += ' deploy:\n';
help += ' type: heroku\n';
help += ' repo: <repository url>\n';
help += ' message: [message]\n\n';
help += 'For more help, you can check the docs: ' + underline('http://hexo.io/docs/deployment.html');
sinonAssert.calledWithMatch(logStub, help);
logStub.restore();
});

it('exist deployDir', () => {
return fs.mkdirs(deployDir).then(() => {
return deployer({
repo: fakeRemote,
silent: true
});
}).then(() => {
return validate();
});
});
});