Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
Fix: Ensure correct version in package (#73)
Browse files Browse the repository at this point in the history
* Fix: Ensure correct version in package

* Add comments to lib/version.js

* Run build before lint and test scripts

* Fix CI script
  • Loading branch information
nzakas committed Jul 23, 2021
1 parent 82a7e6d commit 4ee1d80
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '12.x'
- name: Install dependencies
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ npm-debug.log
.sublimelinterrc
.eslint-release-info.json
dist
*.tgz
11 changes: 10 additions & 1 deletion lib/version.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
const version = "5.1.1";
/**
* @fileoverview Contains the current version number. This file is checked in
* to source control and should always return "main". During the release
* process, this file is overwritten with a new on that returns the actual
* version number. The file with the actual version number is *not* checked
* back into the repo. This is only necessary until Node.js supports import
* assertions, at which time we can just import package.json for this info.
* @author Nicholas C. Zakas
*/
const version = "main";

export default version;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
},
"license": "BSD-2-Clause",
"scripts": {
"prepare": "npm run update-version && npm run build",
"build": "rollup -c",
"lint": "npm run build && node Makefile.js lint",
"update-version": "node tools/update-version.js",
"test": "node Makefile.js test",
"lint": "node Makefile.js lint",
"test": "npm run build && node Makefile.js test",
"prepublishOnly": "npm run update-version && npm run build",
"generate-release": "eslint-generate-release",
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
Expand Down

0 comments on commit 4ee1d80

Please sign in to comment.