2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00
Files
axios/bin/check-build-version.js
T
Dmitriy Mozgovoy 46085e6ffc chore(ci): fix release action;
* chore(ci): Add release-it script;
* fix(utils): redesigned logic for obtaining the global link;;
* chore(git): updated .gitignore;
chore(npm): updated .npmignore;
* chore(git): fix husky prepare script;
* chore(github): reworked npm release action step;
* chore(ci): add CHANGELOG.md contributors section generator;
* chore(deps): add `auto-changelog` to package.json;
2022-12-20 20:45:24 +02:00

30 lines
770 B
JavaScript

import fs from 'fs';
import assert from 'assert';
import axios from '../index.js';
import axiosBuild from '../dist/node/axios.cjs';
const {version} = JSON.parse(fs.readFileSync('./package.json'));
console.log('Checking versions...\n----------------------------')
console.log(`Package version: v${version}`);
console.log(`Axios version: v${axios.VERSION}`);
console.log(`Axios build version: v${axiosBuild.VERSION}`);
console.log(`----------------------------`);
assert.strictEqual(
version,
axios.VERSION,
`Version mismatch between package and Axios ${version} != ${axios.VERSION}`
);
assert.strictEqual(
version,
axiosBuild.VERSION,
`Version mismatch between package and build ${version} != ${axiosBuild.VERSION}`
);
console.log('✔️ PASSED\n');