Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jamesives/github-pages-deploy-action

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jamesives/github-pages-deploy-action - npm Package Compare versions

Comparing version 4.1.6 to 4.1.7

20

__tests__/util.test.ts

@@ -34,22 +34,2 @@ import {ActionInterface, TestFlag} from '../src/constants'

})
it('should return true if the value is null (with allowEmptyString)', async () => {
const value = null
expect(isNullOrUndefined(value, true)).toBeTruthy()
})
it('should return true if the value is undefined (with allowEmptyString)', async () => {
const value = undefined
expect(isNullOrUndefined(value, true)).toBeTruthy()
})
it('should return false if the value is defined (with allowEmptyString)', async () => {
const value = 'montezuma'
expect(isNullOrUndefined(value, true)).toBeFalsy()
})
it('should return false if the value is empty string (with allowEmptyString)', async () => {
const value = ''
expect(isNullOrUndefined(value, true)).toBeFalsy()
})
})

@@ -56,0 +36,0 @@

2

lib/constants.js

@@ -54,3 +54,3 @@ "use strict";

isTest: TestFlag.NONE,
email: !(0, util_1.isNullOrUndefined)((0, core_1.getInput)('git-config-email'), true)
email: !(0, util_1.isNullOrUndefined)((0, core_1.getInput)('git-config-email'))
? (0, core_1.getInput)('git-config-email')

@@ -57,0 +57,0 @@ : pusher && pusher.email

@@ -30,3 +30,3 @@ "use strict";

yield (0, execute_1.execute)(`git config user.name "${action.name}"`, action.workspace, action.silent);
yield (0, execute_1.execute)(`git config user.email "${action.email ? action.email : '<>'}"`, action.workspace, action.silent);
yield (0, execute_1.execute)(`git config user.email "${action.email}"`, action.workspace, action.silent);
try {

@@ -33,0 +33,0 @@ if ((process.env.CI && !action.sshKey) || action.isTest) {

import { ActionInterface } from './constants';
export declare const isNullOrUndefined: (value: unknown, allowEmptyString?: boolean) => boolean;
export declare const isNullOrUndefined: (value: unknown) => boolean;
export declare const generateTokenType: (action: ActionInterface) => string;

@@ -4,0 +4,0 @@ export declare const generateRepositoryPath: (action: ActionInterface) => string;

@@ -14,5 +14,3 @@ "use strict";

If allowEmptyString is passed the parameter is allowed to contain an empty string as a valid parameter. */
const isNullOrUndefined = (value, allowEmptyString = false) => allowEmptyString
? typeof value === 'undefined' || value === null
: typeof value === 'undefined' || value === null || value === '';
const isNullOrUndefined = (value) => typeof value === 'undefined' || value === null || value === '';
exports.isNullOrUndefined = isNullOrUndefined;

@@ -19,0 +17,0 @@ /* Generates a token type used for the action. */

@@ -5,3 +5,3 @@ {

"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
"version": "4.1.6",
"version": "4.1.7",
"license": "MIT",

@@ -43,4 +43,4 @@ "main": "lib/lib.js",

"devDependencies": {
"@types/jest": "27.0.2",
"@types/node": "16.11.7",
"@types/jest": "27.0.3",
"@types/node": "16.11.10",
"@typescript-eslint/eslint-plugin": "4.33.0",

@@ -50,7 +50,7 @@ "@typescript-eslint/parser": "4.33.0",

"eslint-config-prettier": "8.3.0",
"eslint-plugin-jest": "25.2.4",
"eslint-plugin-jest": "25.3.0",
"eslint-plugin-prettier": "4.0.0",
"jest": "26.6.3",
"jest-circus": "27.3.1",
"prettier": "2.4.1",
"prettier": "2.5.0",
"rimraf": "3.0.2",

@@ -57,0 +57,0 @@ "ts-jest": "26.5.6",

@@ -59,7 +59,7 @@ <p align="center">

run: |
npm install
npm ci
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.6
uses: JamesIves/github-pages-deploy-action@4.1.7
with:

@@ -83,3 +83,3 @@ branch: gh-pages # The branch the action should deploy to.

If you'd like to use the functionality provided by this action in your own action you can install it using [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/get-npm) by running the following commands. It's available on both the [npm](https://www.npmjs.com/package/@jamesives/github-pages-deploy-action) and [GitHub registry](https://github.com/JamesIves/github-pages-deploy-action/packages/229985).
If you'd like to use the functionality provided by this action in your own action you can either [create a composite action](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action), or you can install it using [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/get-npm) by running the following commands. It's available on both the [npm](https://www.npmjs.com/package/@jamesives/github-pages-deploy-action) and [GitHub registry](https://github.com/JamesIves/github-pages-deploy-action/packages/229985).

@@ -142,3 +142,3 @@ ```

| `git-config-name` | Allows you to customize the name that is attached to the git config which is used when pushing the deployment commits. If this is not included it will use the name in the GitHub context, followed by the name of the action. | `with` | **No** |
| `git-config-email` | Allows you to customize the email that is attached to the git config which is used when pushing the deployment commits. If this is not included it will use the email in the GitHub context, followed by a generic noreply GitHub email. You can include an empty string value if you wish to omit this field altogether. | `with` | **No** |
| `git-config-email` | Allows you to customize the email that is attached to the git config which is used when pushing the deployment commits. If this is not included it will use the email in the GitHub context, followed by a generic noreply GitHub email. You can include `<>` for the value if you wish to omit this field altogether and push the commits without an email. | `with` | **No** |
| `repository-name` | Allows you to specify a different repository path so long as you have permissions to push to it. This should be formatted like so: `JamesIves/github-pages-deploy-action`. You'll need to use a PAT in the `token` input for this configuration option to work properly. | `with` | **No** |

@@ -184,3 +184,3 @@ | `target-folder` | If you'd like to push the contents of the deployment folder into a specific directory on the deployment branch you can specify it here. | `with` | **No** |

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.6
uses: JamesIves/github-pages-deploy-action@4.1.7
with:

@@ -210,7 +210,7 @@ branch: gh-pages

run: |
npm install
npm ci
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.6
uses: JamesIves/github-pages-deploy-action@4.1.7
with:

@@ -260,3 +260,3 @@ branch: gh-pages

run: |
npm install
npm ci
npm run build

@@ -283,3 +283,3 @@

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.6
uses: JamesIves/github-pages-deploy-action@4.1.7
with:

@@ -305,3 +305,3 @@ branch: gh-pages

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.6
uses: JamesIves/github-pages-deploy-action@4.1.7
```

@@ -333,7 +333,7 @@

run: |
npm install
npm ci
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.6
uses: JamesIves/github-pages-deploy-action@4.1.7
with:

@@ -340,0 +340,0 @@ branch: gh-pages

@@ -98,3 +98,3 @@ import {getInput} from '@actions/core'

isTest: TestFlag.NONE,
email: !isNullOrUndefined(getInput('git-config-email'), true)
email: !isNullOrUndefined(getInput('git-config-email'))
? getInput('git-config-email')

@@ -101,0 +101,0 @@ : pusher && pusher.email

@@ -25,3 +25,3 @@ import {info} from '@actions/core'

await execute(
`git config user.email "${action.email ? action.email : '<>'}"`,
`git config user.email "${action.email}"`,
action.workspace,

@@ -28,0 +28,0 @@ action.silent

@@ -12,9 +12,4 @@ import {isDebug} from '@actions/core'

If allowEmptyString is passed the parameter is allowed to contain an empty string as a valid parameter. */
export const isNullOrUndefined = (
value: unknown,
allowEmptyString = false
): boolean =>
allowEmptyString
? typeof value === 'undefined' || value === null
: typeof value === 'undefined' || value === null || value === ''
export const isNullOrUndefined = (value: unknown): boolean =>
typeof value === 'undefined' || value === null || value === ''

@@ -21,0 +16,0 @@ /* Generates a token type used for the action. */

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc