Skip to content

Commit

Permalink
Revert "feat: use address@2 (#53)" (#54)
Browse files Browse the repository at this point in the history
This reverts commit 55f48d7.
  • Loading branch information
fengmk2 authored May 8, 2024
1 parent 174fc43 commit 48dfe47
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

module.exports = {
extends: 'eslint-config-egg',
parserOptions: {
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '38 21 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
7 changes: 5 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ name: CI
on:
push:
branches: [ master ]

pull_request:
branches: [ master ]

workflow_dispatch: {}

jobs:
Job:
name: Node.js
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
uses: artusjs/github-actions/.github/workflows/node-test.yml@v1
with:
os: 'ubuntu-latest'
version: '14, 16, 18, 20, 22'
version: '14, 16, 18'
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ on:
push:
branches: [ master ]

workflow_dispatch: {}

jobs:
release:
name: Node.js
uses: node-modules/github-actions/.github/workflows/node-release.yml@master
uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
checkTest: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Most likely network error, check that your `/etc/hosts` and make sure the conten
| :---: | :---: | :---: | :---: | :---: | :---: |
[<img src="https://avatars.githubusercontent.com/u/52845048?v=4" width="100px;"/><br/><sub><b>snapre</b></sub>](https://github.com/snapre)<br/>|[<img src="https://avatars.githubusercontent.com/u/56271907?v=4" width="100px;"/><br/><sub><b>yavuzakyuz</b></sub>](https://github.com/yavuzakyuz)<br/>|[<img src="https://avatars.githubusercontent.com/u/197375?v=4" width="100px;"/><br/><sub><b>antife-yinyue</b></sub>](https://github.com/antife-yinyue)<br/>

This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Wed May 08 2024 15:54:54 GMT+0800`.
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Wed Sep 21 2022 23:10:27 GMT+0800`.

<!-- GITCONTRIBUTOR_END -->

Expand Down
2 changes: 2 additions & 0 deletions bin/detect-port.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env node

'use strict';

const pkg = require('../package');

const args = process.argv.slice(2);
Expand Down
4 changes: 3 additions & 1 deletion lib/detect-port.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict';

const net = require('net');
const debug = require('util').debuglog('detect-port');
const address = require('address');
const debug = require('debug')('detect-port');

module.exports = (port, callback) => {
let hostname = '';
Expand Down
4 changes: 3 additions & 1 deletion lib/wait-port.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const debug = require('util').debuglog('wait-port');
'use strict';

const debug = require('debug')('wait-port');
const detect = require('./detect-port');

const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
Expand Down
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@
"url": "git://github.com/node-modules/detect-port.git"
},
"dependencies": {
"address": "^2.0.2"
"address": "^1.0.1",
"debug": "4"
},
"devDependencies": {
"command-line-test": "1",
"egg-bin": "6",
"eslint": "8",
"eslint-config-egg": "12",
"git-contributor": "2",
"mm": "3",
"pedding": "1"
"egg-bin": "^5.2.0",
"eslint": "^8.23.1",
"eslint-config-egg": "^12.0.0",
"git-contributor": "1",
"mm": "^2.1.0",
"pedding": "^1.1.0",
"power-assert": "^1.6.1"
},
"scripts": {
"test": "egg-bin test",
Expand All @@ -39,7 +41,7 @@
"contributor": "git-contributor"
},
"engines": {
"node": ">= 14.0.0"
"node": ">= 4.0.0"
},
"homepage": "https://github.com/node-modules/detect-port",
"license": "MIT"
Expand Down
2 changes: 2 additions & 0 deletions test/cli.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

const path = require('path');
const assert = require('assert');
const CliTest = require('command-line-test');
Expand Down
5 changes: 4 additions & 1 deletion test/detect-port.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
'use strict';

const mm = require('mm');
const dns = require('dns');
const net = require('net');
const pedding = require('pedding');
const address = require('address');
const assert = require('assert');
const assert = require('power-assert');

const detectPort = require('..');

describe('test/detect-port.test.js', () => {
Expand Down
3 changes: 3 additions & 0 deletions test/wait-port.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use strict';

const mm = require('mm');
const net = require('net');

const { waitPort } = require('..');

describe('test/wait-port.test.js', () => {
Expand Down

0 comments on commit 48dfe47

Please sign in to comment.