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

chore: add rush #2329

Merged
merged 47 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3ba77c3
chore: update Node version to v22.12.0 and add Rush configuration files
drazisil Dec 15, 2024
7493745
chore: update Rush version to 5.147.0 and clean up configuration files
drazisil Dec 15, 2024
c13391f
chore(config): remove deprecated Rush configuration files
drazisil Dec 15, 2024
84c9390
chore(npm): remove global .npmrc and migrate settings to Rush-specifi…
drazisil Dec 15, 2024
e2b8aa5
chore: remove mcos.junit.xml files from various packages
drazisil Dec 15, 2024
8b047f4
chore: update .gitignore to exclude test result XML files
drazisil Dec 15, 2024
e875736
chore: add path filters to exclude repo-state.json in coderabbit config
drazisil Dec 15, 2024
5c69fed
chore: rename CI workflow file and update Node.js version in rush.yml
drazisil Dec 15, 2024
fe5053e
chore: rename CI workflow to Rush
drazisil Dec 15, 2024
b2ab94e
Update rush.yml
drazisil Dec 15, 2024
b32ea01
chore: update actions/checkout to version 4 in rush.yml
drazisil Dec 15, 2024
d4e6b8b
chore: add workflow_dispatch trigger and downgrade Node.js version to…
drazisil Dec 15, 2024
2f5f524
Update rush.yml
drazisil Dec 15, 2024
72fe260
chore: add .npmrc configuration file for Rush package manager
drazisil Dec 16, 2024
3c0fe30
chore: remove "type": "module" from package.json
drazisil Dec 16, 2024
2ea6b34
chore: update Node.js version to 22 in rush.yml
drazisil Dec 16, 2024
5cdaca9
Merge branch 'dev' into add-rush
drazisil Dec 16, 2024
bc9c519
chore: update rush.json to specify default branch and repository URL
drazisil Dec 16, 2024
361ac31
chore: update config.yml to exclude install-run-rushx.js from path fi…
drazisil Dec 16, 2024
4dc4c39
chore: update config.yml to exclude install-run-rush.js and install-r…
drazisil Dec 16, 2024
f193a9b
chore: update pnpmVersion to 9.15.0 in rush.json
drazisil Dec 16, 2024
b4e5cf4
chore: add pnpm-lock.yaml for dependency management
drazisil Dec 16, 2024
224bc28
chore: add logger utility with TypeScript support and update workspac…
drazisil Dec 16, 2024
2eccc55
chore: update pnpm install command to use --no-frozen-lockfile option
drazisil Dec 16, 2024
3572404
chore: test all logger methods
drazisil Dec 16, 2024
6e1806d
Merge branch 'dev' into add-rush
drazisil Dec 16, 2024
0fce4d8
chore: update pnpm-lock.yaml to include utils dependency and remove b…
drazisil Dec 16, 2024
f1df5b7
Merge branch 'add-rush' of https://github.com/rustymotors/server into…
drazisil Dec 16, 2024
fa1149b
chore: remove --production flag from Rush rebuild command
drazisil Dec 16, 2024
ec5773c
chore: enhance logger configuration and improve test type safety
drazisil Dec 16, 2024
034d605
chore: enhance logger interface
drazisil Dec 16, 2024
ae6386b
chore: update path filters in coderabbit config to exclude additional…
drazisil Dec 16, 2024
c451fc9
chore: update pnpm-lock.yaml to include new Sentry packages and their…
drazisil Dec 16, 2024
838ad03
chore: remove --no-frozen-lockfile option from pnpm install command
drazisil Dec 16, 2024
3e4e51d
chore: update GitHub Actions email to use noreply address
drazisil Dec 16, 2024
f6a9790
test: enhance logger tests to handle various message types and edge c…
drazisil Dec 16, 2024
4e78715
chore: standardize quotes in GitHub Actions workflow configuration
drazisil Dec 16, 2024
35a1c8d
chore: escape plus sign in GitHub Actions email configuration
drazisil Dec 16, 2024
5b47031
chore: add Codecov action to upload test results
drazisil Dec 16, 2024
18e1ae0
test: add more test cases
drazisil Dec 16, 2024
22cc8c1
test: refactor logger tests for consistency and readability
drazisil Dec 16, 2024
b241c13
chore: update Node.js setup action to version 4
drazisil Dec 16, 2024
3212263
chore: update Rush workflow to support multiple Node.js versions
drazisil Dec 16, 2024
0f4a05e
chore(ci): unescape email address
drazisil Dec 16, 2024
df674b3
chore: update nodeSupportedVersionRange to support Node.js versions 2…
drazisil Dec 16, 2024
41e23e8
chore: remove unnecessary Git config user step from Rush workflow
drazisil Dec 16, 2024
a8b914c
chore: enhance logger type definition for improved type safety
drazisil Dec 16, 2024
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
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

19 changes: 0 additions & 19 deletions .changeset/poor-nails-smoke.md

This file was deleted.

24 changes: 0 additions & 24 deletions .changeset/pre.json

This file was deleted.

3 changes: 3 additions & 0 deletions .coderabbit/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
path_filters:
exclude:
- 'common/config/rush/repo-state.json'
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
pnpm-lock.yaml merge=text
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary

# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
# may also require a special configuration to allow comments in JSON.
#
# For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088
#
*.json linguist-language=JSON-with-Comments
28 changes: 28 additions & 0 deletions .github/workflows/rush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Rush
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git config user
uses: snow-actions/git-config-user@v1.0.0
with:
name: 'Molly Crendraven'
email: 'drazi@duck.com'
drazisil marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/setup-node@v3
with:
node-version: 22
drazisil marked this conversation as resolved.
Show resolved Hide resolved
- name: Verify Change Logs
run: node common/scripts/install-run-rush.js change --verify
- name: Rush Install
run: node common/scripts/install-run-rush.js install
- name: Rush rebuild
run: node common/scripts/install-run-rush.js rebuild --verbose --production
115 changes: 95 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,99 @@
*.env
*.tsbuildinfo
logs
coverage
# Logs
*.log
.nyc_output

test-reports
junit
built
*.sqlite
junit.xml
.dccache
*.db
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov/

# Coverage directory used by tools like istanbul
coverage/

# nyc test coverage
.nyc_output/

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt/

# Bower dependency directory (https://bower.io/)
bower_components/

# node-waf configuration
.lock-wscript/

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release/

# Dependency directories
node_modules/
jspm_packages/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm/

# Optional eslint cache
.eslintcache/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.development.local
.env.test.local
.env.production.local
.env.local


# OS X temporary files
.DS_Store

dist
# Sentry Auth Token
.sentryclirc
*.map
out/*
mcos.junit.xml
package-lock.json
# Visual Studio Code
.vscode/
!.vscode/tasks.json
!.vscode/launch.json

# Rush temporary files
common/deploy/
common/temp/
common/autoinstallers/*/.npmrc
**/.rush/temp/
*.lock

# Common toolchain intermediate files
temp/
lib/
lib-amd/
lib-es6/
lib-esnext/
lib-commonjs/
lib-shim/
dist/
dist-storybook/
*.tsbuildinfo

# Heft temporary files
.cache/
.heft/

# Test result files
*.xml
28 changes: 27 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
# Rush uses this file to configure the NPM package registry during installation. It is applicable
# to PNPM, NPM, and Yarn package managers. It is used by operations such as "rush install",
# "rush update", and the "install-run.js" scripts.
#
# NOTE: The "rush publish" command uses .npmrc-publish instead.
#
# Before invoking the package manager, Rush will generate an .npmrc in the folder where installation
# is performed. This generated file will omit any config lines that reference environment variables
# that are undefined in that session; this avoids problems that would otherwise result due to
# a missing variable being replaced by an empty string.
#
# If "subspacesEnabled" is true in subspaces.json, the generated file will merge settings from
# "common/config/rush/.npmrc" and "common/config/subspaces/<name>/.npmrc", with the latter taking
# precedence.
#
# * * * SECURITY WARNING * * *
#
# It is NOT recommended to store authentication tokens in a text file on a lab machine, because
# other unrelated processes may be able to read that file. Also, the file may persist indefinitely,
# for example if the machine loses power. A safer practice is to pass the token via an
# environment variable, which can be referenced from .npmrc using ${} expansion. For example:
#
# //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
#
registry=https://registry.npmjs.org/
always-auth=false
node-options="--openssl-legacy-provider"
link-workspace-packages=true
link-workspace-packages=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.17.0
v22.12.0
28 changes: 28 additions & 0 deletions common/config/rush/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Rush uses this file to configure the NPM package registry during installation. It is applicable
# to PNPM, NPM, and Yarn package managers. It is used by operations such as "rush install",
# "rush update", and the "install-run.js" scripts.
#
# NOTE: The "rush publish" command uses .npmrc-publish instead.
#
# Before invoking the package manager, Rush will generate an .npmrc in the folder where installation
# is performed. This generated file will omit any config lines that reference environment variables
# that are undefined in that session; this avoids problems that would otherwise result due to
# a missing variable being replaced by an empty string.
#
# If "subspacesEnabled" is true in subspaces.json, the generated file will merge settings from
# "common/config/rush/.npmrc" and "common/config/subspaces/<name>/.npmrc", with the latter taking
# precedence.
#
# * * * SECURITY WARNING * * *
#
# It is NOT recommended to store authentication tokens in a text file on a lab machine, because
# other unrelated processes may be able to read that file. Also, the file may persist indefinitely,
# for example if the machine loses power. A safer practice is to pass the token via an
# environment variable, which can be referenced from .npmrc using ${} expansion. For example:
#
# //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
#
registry=https://registry.npmjs.org/
always-auth=false
node-options="--openssl-legacy-provider"
link-workspace-packages=true
20 changes: 20 additions & 0 deletions common/config/rush/.npmrc-publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This config file is very similar to common/config/rush/.npmrc, except that .npmrc-publish
# is used by the "rush publish" command, as publishing often involves different credentials
# and registries than other operations.
#
# Before invoking the package manager, Rush will copy this file to "common/temp/publish-home/.npmrc"
# and then temporarily map that folder as the "home directory" for the current user account.
# This enables the same settings to apply for each project folder that gets published. The copied file
# will omit any config lines that reference environment variables that are undefined in that session;
# this avoids problems that would otherwise result due to a missing variable being replaced by
# an empty string.
#
# * * * SECURITY WARNING * * *
#
# It is NOT recommended to store authentication tokens in a text file on a lab machine, because
# other unrelated processes may be able to read the file. Also, the file may persist indefinitely,
# for example if the machine loses power. A safer practice is to pass the token via an
# environment variable, which can be referenced from .npmrc using ${} expansion. For example:
#
# //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
#
38 changes: 38 additions & 0 deletions common/config/rush/.pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
'use strict';

/**
* When using the PNPM package manager, you can use pnpmfile.js to workaround
* dependencies that have mistakes in their package.json file. (This feature is
* functionally similar to Yarn's "resolutions".)
*
* For details, see the PNPM documentation:
* https://pnpm.io/pnpmfile#hooks
*
* IMPORTANT: SINCE THIS FILE CONTAINS EXECUTABLE CODE, MODIFYING IT IS LIKELY TO INVALIDATE
* ANY CACHED DEPENDENCY ANALYSIS. After any modification to pnpmfile.js, it's recommended to run
* "rush update --full" so that PNPM will recalculate all version selections.
*/
module.exports = {
hooks: {
readPackage
}
};

/**
* This hook is invoked during installation before a package's dependencies
* are selected.
* The `packageJson` parameter is the deserialized package.json
* contents for the package that is about to be installed.
* The `context` parameter provides a log() function.
* The return value is the updated object.
*/
function readPackage(packageJson, context) {

// // The karma types have a missing dependency on typings from the log4js package.
// if (packageJson.name === '@types/karma') {
// context.log('Fixed up dependencies for @types/karma');
// packageJson.dependencies['log4js'] = '0.6.38';
// }

return packageJson;
}
10 changes: 10 additions & 0 deletions common/config/rush/pnpm-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json",
"useWorkspaces": true,
"globalOverrides": {},
"globalPeerDependencyRules": {},
"globalPackageExtensions": {},
"globalNeverBuiltDependencies": [],
"globalAllowedDeprecatedVersions": {},
"unsupportedPackageJsonSettings": {}
}
4 changes: 4 additions & 0 deletions common/config/rush/repo-state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
drazisil marked this conversation as resolved.
Show resolved Hide resolved
{
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
}
25 changes: 25 additions & 0 deletions common/git-hooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
#
# This is an example Git hook for use with Rush. To enable this hook, rename this file
# to "commit-msg" and then run "rush install", which will copy it from common/git-hooks
# to the .git/hooks folder.
#
# TO LEARN MORE ABOUT GIT HOOKS
#
# The Git documentation is here: https://git-scm.com/docs/githooks
# Some helpful resources: https://githooks.com
#
# ABOUT THIS EXAMPLE
#
# The commit-msg hook is called by "git commit" with one argument, the name of the file
# that has the commit message. The hook should exit with non-zero status after issuing
# an appropriate message if it wants to stop the commit. The hook is allowed to edit
# the commit message file.

# This example enforces that commit message should contain a minimum amount of
# description text.
if [ `cat $1 | wc -w` -lt 3 ]; then
echo ""
echo "Invalid commit message: The message must contain at least 3 words."
exit 1
fi
Loading
Loading