From 7511e2e0fb45c21ca9d477ff6ba1cf855f3fb917 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Fri, 22 Sep 2023 20:46:06 +0800 Subject: [PATCH 1/2] chore: start 1.x branch --- README.md | 2 +- package.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f108b82..99049fb 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ DNS servers receive from `/etc/resolv.conf`. ## Install ```bash -$ npm install address +$ npm install address@1 ``` ## Usage diff --git a/package.json b/package.json index 1d9b814..bc5fa02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,9 @@ { "name": "address", "version": "1.2.2", + "publishConfig": { + "tag": "latest-1" + }, "description": "Get current machine IP, MAC and DNS servers.", "main": "lib/address.js", "types": "lib/address.d.ts", From f21698197e033144d56b7a81d51f2be27b55e50e Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Fri, 22 Sep 2023 21:17:18 +0800 Subject: [PATCH 2/2] test: enable test on 1.x --- .github/workflows/codeql-analysis.yml | 70 --------------------------- .github/workflows/nodejs.yml | 13 ++--- .github/workflows/release.yml | 8 +-- test/ts.test.js | 3 +- 4 files changed, 7 insertions(+), 87 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 3b6a3c2..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,70 +0,0 @@ -# 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: '17 10 * * 2' - -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. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # 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 - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c7a5144..d1ed0f5 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -2,20 +2,15 @@ name: CI on: push: - branches: [ master ] + branches: [ master, 1.x ] pull_request: - branches: [ master ] - - schedule: - - cron: '0 2 * * *' - - workflow_dispatch: {} + branches: [ master, 1.x ] jobs: Job: name: Node.js - uses: artusjs/github-actions/.github/workflows/node-test.yml@v1 + uses: node-modules/github-actions/.github/workflows/node-test.yml@master with: os: 'ubuntu-latest, macos-latest' - version: '14, 16, 18' + version: '14, 16, 18, 20' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6cc6c8..76cbd45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,17 +1,13 @@ name: Release on: - # 合åšļ后č‡Ē动发布 push: - branches: [ master ] - - # 手动发布 - workflow_dispatch: {} + branches: [ master, 1.x ] jobs: release: name: Node.js - uses: artusjs/github-actions/.github/workflows/node-release.yml@v1 + uses: node-modules/github-actions/.github/workflows/node-release.yml@master secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GIT_TOKEN: ${{ secrets.GIT_TOKEN }} diff --git a/test/ts.test.js b/test/ts.test.js index 5a5597c..40dbdb8 100644 --- a/test/ts.test.js +++ b/test/ts.test.js @@ -5,8 +5,7 @@ describe('test/ts.test.js', () => { it('should works with ts without error', done => { const cwd = path.resolve(__dirname, './fixtures/ts'); const tsconfigPath = path.resolve(cwd, 'tsconfig.json'); - const testFile = path.resolve(cwd, 'test'); - runscript(`tsc -p ${tsconfigPath} && node ${testFile}`, { stdio: 'inherit' }) + runscript(`tsc -p ${tsconfigPath}`, { stdio: 'inherit' }) .then(() => done()) .catch(done); });