Skip to content

Commit

Permalink
feat: cli requires node 14
Browse files Browse the repository at this point in the history
  • Loading branch information
favoyang committed May 8, 2022
1 parent d905839 commit c51dfb5
Show file tree
Hide file tree
Showing 6 changed files with 4,842 additions and 6,356 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
node-version: [14.x]
name: CI - node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: set node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install
Expand All @@ -25,9 +25,9 @@ jobs:
needs: test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Release
uses: cycjimmy/semantic-release-action@v2
uses: cycjimmy/semantic-release-action@v3
with:
extra_plugins: |
@semantic-release/changelog
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The command-line tool installs the 3rd-party registry as a scoped registry and m
## Installation

- Requires [nodejs 12](https://nodejs.org/en/download/).
- Requires [nodejs 14 or above](https://nodejs.org/en/download/).
- Install via npm:

```
Expand Down
4 changes: 2 additions & 2 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const url = require("url");
const _ = require("lodash");
const chalk = require("chalk");
const mkdirp = require("mkdirp");
const isIp = require("is-ip");
const net = require('node:net');
const isWsl = require("is-wsl");
const keyFileStorage = require("key-file-storage").default;
const TOML = require("@iarna/toml");
Expand Down Expand Up @@ -62,7 +62,7 @@ const parseEnv = async function(options, { checkPath }) {
if (registry.endsWith("/")) registry = registry.slice(0, -1);
env.registry = registry;
const hostname = url.parse(registry).hostname;
if (isIp(hostname)) env.namespace = hostname;
if (net.isIP(hostname)) env.namespace = hostname;
else
env.namespace = hostname
.split(".")
Expand Down
Loading

0 comments on commit c51dfb5

Please sign in to comment.