Skip to content

Commit

Permalink
fix: Import version properly as string not object
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu committed Jun 9, 2021
1 parent fbeda37 commit 5249706
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.5.2
### Fixes
- # fix: Import version properly as string not object

## 1.5.1
### Fixes
- #320 doc: add github actions badge
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ function onceStrict (fn) {
"use strict";

exports.__esModule = true;
var VERSION = 'v1.5.0';
var VERSION = 'v1.5.2';
exports["default"] = VERSION;


Expand Down Expand Up @@ -7188,7 +7188,7 @@ exports.checkBypass = checkBypass;
exports.__esModule = true;
var core = __webpack_require__(470);
var github = __webpack_require__(469);
var VERSION = __webpack_require__(52);
var version_1 = __webpack_require__(52);
var context = github.context;
var isTrue = function (variable) {
var lowercase = variable.toLowerCase();
Expand Down Expand Up @@ -7233,7 +7233,7 @@ var buildExec = function () {
var filepath = workingDir ?
workingDir + '/codecov.sh' : 'codecov.sh';
var execArgs = [filepath];
execArgs.push('-n', "" + name, '-F', "" + flags, '-Q', "github-action-" + VERSION);
execArgs.push('-n', "" + name, '-F', "" + flags, '-Q', "github-action-" + version_1["default"]);
var options = {};
options.env = Object.assign(process.env, {
GITHUB_ACTION: process.env.GITHUB_ACTION,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "1.5.1",
"version": "1.5.2",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/buildExec.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import buildExec from './buildExec';
const github = require('@actions/github');

const VERSION = require('./version');
import VERSION from './version';

const context = github.context;

Expand Down
2 changes: 1 addition & 1 deletion src/buildExec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const core = require('@actions/core');
const github = require('@actions/github');

const VERSION = require('./version');
import VERSION from './version';

const context = github.context;

Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const VERSION = 'v1.5.0';
const VERSION = 'v1.5.2';

export default VERSION;

1 comment on commit 5249706

@RA80533
Copy link
Contributor

@RA80533 RA80533 commented on 5249706 Jun 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message is a misnomer. VERSION was exported as an ECMAScript module. CommonJS imports (using require()) cannot handle those on their own and rely on additional tooling to downgrade the import to one compatible with CommonJS.

The end result was the same. VERSION was still a string.

Please sign in to comment.