Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade deps, support node 20, remove legacy commands #21

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,10 @@ name: Build Pull Request

on:
pull_request:
paths:
- '.github/workflows/**/*'
- '.eslintrc.json'
- '.autorc'
- 'gulpfile.ts'
- 'tsconfig.json'
- 'bin/**/*'
- 'config/**/*'
- 'src/**/*'
- 'templates/**/*'
- 'test/**/*'
- 'package.json'
- 'package-lock.json'

jobs:
build:
name: Build and Test
name: Build
uses: tyler-technologies-oss/forge-automation-shared/.github/workflows/wf-build-and-test.yml@v2.9.0
with:
TESTS_ENABLED: false
secrets:
NPM_TOKEN: ${{ secrets.FORGE_NPM_TOKEN }}
19 changes: 0 additions & 19 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@ on:
push:
branches:
- next
paths:
- '.github/workflows/**/*'
- '.eslintrc.json'
- '.autorc'
- 'gulpfile.ts'
- 'tsconfig.json'
- 'auto.config.ts'
- 'bin/**/*'
- 'config/**/*'
- 'src/**/*'
- 'templates/**/*'
- 'test/**/*'
- 'package.json'
- 'package-lock.json'
workflow_dispatch:

concurrency: build-release-${{ github.ref }}
Expand Down Expand Up @@ -91,13 +77,9 @@ jobs:
- 'config/**'
- 'src/**'
- 'templates/**'
test:
- 'src/**'
- 'test/**'
outputs:
is-release: ${{ steps.detect-release.outputs.release }}
build-files-changed: ${{ steps.file-filter.outputs.build == 'true' }}
test-files-changed: ${{ steps.file-filter.outputs.test == 'true' }}

# This job will run on non-release builds for general CI validation only if files are changed that need to be built
build:
Expand All @@ -107,7 +89,6 @@ jobs:
if: ${{ needs.wf-config.outputs.is-release == 'false' && (needs.wf-config.outputs.build-files-changed == 'true' || needs.wf-config.outputs.test-files-changed == 'true') }}
with:
BUILD_ENABLED: ${{ needs.wf-config.outputs.build-files-changed == 'true' }}
TESTS_ENABLED: ${{ needs.wf-config.outputs.test-files-changed == 'true' }}
secrets:
NPM_TOKEN: ${{ secrets.FORGE_NPM_TOKEN }}

Expand Down
16 changes: 2 additions & 14 deletions bin/forge.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,7 @@

process.title = 'forge';

// Ensure node version
import semver from 'semver';
import packageJson from '../package.json' assert { type: 'json' };
var currentNodeVersion = process.version.replace('v', '');
var requiresNodeVersion = packageJson.engines.node;

if (!semver.satisfies(currentNodeVersion, requiresNodeVersion)) {
var chalk = require('chalk');
console.error(chalk.red(`ERROR: Forge CLI requires Node version ${requiresNodeVersion}`));
process.exit(1);
}

// Initialize the cli
import { run } from '../dist/esm/index.js';
import { fileURLToPath } from 'url';
import { run } from '../dist/index.js';

run(process, fileURLToPath(import.meta.url));
7 changes: 2 additions & 5 deletions config/build-schema.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://forge.tylertech.com/build-schema.json",
"title": "Forge CLI Configuration",
"$id": "tyler-forge-build-schema",
"title": "Tyler Forge CLI Configuration",
"type": "object",
"additionalProperties": false,
"required": [
"build"
],
"properties": {
"$schema": {
"type": "string"
Expand Down
72 changes: 6 additions & 66 deletions config/schema.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://forge.tylertech.com/schema.json",
"title": "Forge CLI Configuration",
"$id": "tyler-forge-schema",
"title": "Tyler Forge CLI Configuration",
"type": "object",
"additionalProperties": false,
"required": [
"packageName"
],
"properties": {
"$schema": {
"type": "string"
Expand All @@ -17,9 +14,6 @@
"libDirName": {
"$ref": "#/definitions/libDirName"
},
"demoDirName": {
"$ref": "#/definitions/demoDirName"
},
"testDirName": {
"$ref": "#/definitions/testDirName"
},
Expand All @@ -29,15 +23,6 @@
"buildConfigFileName": {
"$ref": "#/definitions/buildConfigFileName"
},
"templateVersion": {
"$ref": "#/definitions/templateVersion"
},
"packageOrg": {
"$ref": "#/definitions/packageOrg"
},
"packageName": {
"$ref": "#/definitions/packageName"
},
"packageConfig": {
"$ref": "#/definitions/packageConfig"
},
Expand All @@ -61,18 +46,6 @@
}
},
"definitions": {
"forge": {
"type": "boolean",
"description": "Used to specify that this package is the core Foerge package for resolving core dependencies. Don't use unless you know what you are doing.",
"default": false
},
"templateVersion": {
"type": "string",
"description": "The version of the CLI scaffolding templates to use.",
"enum": [
"v1"
]
},
"srcDirName": {
"type": "string",
"description": "The name of the source directory.",
Expand All @@ -83,11 +56,6 @@
"description": "The name of the library directory under [srcDirName].",
"default": "lib"
},
"demoDirName": {
"type": "string",
"description": "The name of the library directory under [srcDirName].",
"default": "lib"
},
"testDirName": {
"type": "string",
"description": "The name of the test directory under [srcDirName].",
Expand All @@ -103,10 +71,6 @@
"description": "The name of the build configuration file optionally located in each component directory that is used for specifying build options.",
"default": "build.json"
},
"packageName": {
"type": "string",
"description": "The base npm package name."
},
"customElementsManifestConfig": {
"type": "object",
"description": "The name of the build configuration file optionally located in each component directory that is used for specifying build options.",
Expand Down Expand Up @@ -158,10 +122,6 @@
}
}
},
"registry": {
"type": "string",
"description": "The npm registry."
},
"license": {
"type": "object",
"description": "Information about the license that this project uses for distribution.",
Expand All @@ -172,10 +132,6 @@
}
}
},
"packageOrg": {
"type": "string",
"description": "The npm org to place each package generated from this library under."
},
"build": {
"type": "object",
"description": "Specify build override options here.",
Expand All @@ -197,21 +153,10 @@
}
}
},
"demo": {
"description": "Additional options to add to the demo application's build",
"type": "object",
"additionalProperties": false,
"properties": {
"componentBundles": {
"description": "Additional components to create separate bundles",
"type": "array",
"additionalProperties": false,
"default": [],
"items": {
"type": "string"
}
}
}
"distributionBundleName": {
"type": "string",
"description": "The name of the distribution bundle to generate.",
"default": "lib.js"
},
"tsconfigPath": {
"description": "Sets the path to the tsconfig file to use.",
Expand Down Expand Up @@ -452,11 +397,6 @@
"description": "The path to the unit testing spec directory.",
"default": "src/test/spec"
},
"demoDir": {
"type": "string",
"description": "The path to the demo app website.",
"default": "src/demo"
},
"stylelintConfigPath": {
"type": "string",
"description": "The path to the global stylelint configuration file.",
Expand Down
28 changes: 0 additions & 28 deletions jest.config.json

This file was deleted.

Loading
Loading