Skip to content

Commit

Permalink
Convert eslint dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed May 18, 2024
1 parent 20fd4b9 commit 317e5fa
Show file tree
Hide file tree
Showing 8 changed files with 1,045 additions and 254 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"node": true
},
"extends": [
"cimpress-atsquad"
"@authress/eslint-config"
],
"rules": {
"arrow-parens": ["error", "as-needed"],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.20.2
node-version: 16.15.0
registry-url: 'https://registry.npmjs.org'

- name: Install packages
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
21 changes: 19 additions & 2 deletions bin/template/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,25 @@ const commander = require('commander');
const aws = require('aws-sdk');
const AwsArchitect = require('aws-architect');

let ci = require('ci-build-tools')(process.env.GIT_TAG_PUSHER);
let version = ci.GetVersion();
function getVersion() {
let release_version = '0.0';
const pull_request = '';
const branch = process.env.GITHUB_REF;
const build_number = process.env.GITHUB_RUN_NUMBER;

//Builds of pull requests
if (pull_request && !pull_request.match(/false/i)) {
release_version = `0.${pull_request}`;
} else if (!branch || !branch.match(/^(refs\/heads\/)?release[/-]/i)) {
//Builds of branches that aren't master or release
release_version = '0.0';
} else {
//Builds of release branches (or locally or on server)
release_version = branch.match(/^(?:refs\/heads\/)?release[/-](\d+(?:\.\d+){0,3})$/i)[1];
}
return `${release_version}.${(build_number || '0')}.0.0.0.0`.split('.').slice(0, 3).join('.');
}
const version = getVersion();
commander.version(version);

let packageMetadataFile = path.join(__dirname, 'package.json');
Expand Down
14 changes: 6 additions & 8 deletions bin/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"dependencies": {
"authress-sdk": "^2.0.56",
"axios": "^0.21.4",
"ci-build-tools": "^1.0.13",
"fs-extra": "^7.0.1",
"microservice-utilities": "^0.1.121",
"openapi-factory": "^5.3.48"
Expand All @@ -27,12 +26,11 @@
"chai": "^4.2.0",
"commander": "^2.19.0",
"error-object-polyfill": "^1.0.13",
"eslint": "^6.1.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-mocha": "^5.2.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint": "^8.35.0",
"eslint-config-cimpress-atsquad": "^1.0.67",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-mocha": "^10.0.5",
"eslint-plugin-node": "^11.1.0",
"glob": "^7.1.3",
"mocha": "^5.2.0",
"nodemon": "^1.18.7",
Expand All @@ -52,6 +50,6 @@
},
"homepage": "https://source-code.com",
"engines": {
"node": ">=8.10.0"
"node": ">=16.15.0"
}
}
6 changes: 2 additions & 4 deletions make.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/**
* Module dependencies
*/
let commander = require('commander');
let fs = require('fs-extra');
const commander = require('commander');
const fs = require('fs-extra');

const githubActionsRunner = require('ci-build-tools')(process.env.GITHUB_TOKEN);
function getVersion() {
let release_version = '0.0';
const pull_request = '';
Expand Down Expand Up @@ -51,7 +50,6 @@ commander
let package_metadata = require('./package.json');
console.log('After build package %s (%s)', package_metadata.name, version);
console.log('');
githubActionsRunner.MergeDownstream('release/', 'master');
});

commander.on('*', () => {
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@
"aws-sdk": ">=2.877.0"
},
"devDependencies": {
"@authress/eslint-config": "^1.0.2",
"aws-sdk": "*",
"chai": "^3.5.0",
"ci-build-tools": "^1.0.13",
"error-object-polyfill": "^1.1.14",
"eslint": "~8.35.0",
"eslint-config-cimpress-atsquad": "^1.0.67",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-mocha": "^10.0.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"glob": "^5.0.15",
"mocha": "^10.1.0",
"sinon": "^1.17.3"
Expand Down
Loading

0 comments on commit 317e5fa

Please sign in to comment.