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

Windows repo maker #2

Open
wants to merge 61 commits into
base: 1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e7f8333
init cli and config, implemented msxi repo builder
origin-yaropolk Dec 16, 2022
75b7162
readme sketch
origin-yaropolk Dec 16, 2022
c6454c0
linter fix
origin-yaropolk Dec 16, 2022
c5c0822
dynamically loaded config, configurable appinstaller
origin-yaropolk Dec 19, 2022
c1fb961
Merge branch 'windows-repo-maker' of https://github.com/tradingview/j…
origin-yaropolk Dec 19, 2022
5888bc9
fix tsconfig
origin-yaropolk Dec 19, 2022
e9b9e25
fixed exhaust config example in README
origin-yaropolk Dec 19, 2022
e82fb8b
refactor cli and config initialization
origin-yaropolk Dec 19, 2022
8560eef
exhaust config will be type of unite of other config types
origin-yaropolk Dec 19, 2022
15323b3
initial cli and configuration setup
origin-yaropolk Jan 27, 2023
76cdee7
removed global state of config
origin-yaropolk Feb 15, 2023
0e52df0
chore: use `program` to specify path to executable
Nipheris Feb 22, 2023
2bfab2d
chore: create a separate package for integration tests
Nipheris Mar 6, 2023
f74dbaf
chore: unit tests via Jest
Nipheris Mar 22, 2023
104bf65
chore(tests): integration tests via Jest
Nipheris Apr 4, 2023
56b2933
chore: Volta + pnpm = love
Nipheris Apr 4, 2023
066fdf8
chore: lint-staged: use package.json script to call eslint
Nipheris Apr 6, 2023
de91feb
chore: migrate from cross-env to pnpm's shell emulator
Nipheris Apr 6, 2023
b473122
chore: unit tests in Visual Studio Code
Nipheris Apr 7, 2023
e14e445
chore: move common TypeScript compiler options to base config, fix in…
Nipheris Apr 7, 2023
cc7bc9d
chore(tests): fix Volta configuration
Nipheris Apr 14, 2023
75774bd
fix(tests): remove unused module (fixes 104bf65032018d00024e099a96cf8…
Nipheris Apr 14, 2023
ed85a5a
chore: update TypeScript to 5.0.4 :arrow_up:
Nipheris Apr 17, 2023
e8081a7
chore: migrate to separate @tsconfig packages (thanks to multiple con…
Nipheris Apr 17, 2023
84d53d6
chore: update ts-jest to support TypeScript 5.x :arrow_up:
Nipheris Apr 17, 2023
0c80e80
refactor: make things a bit simpler
Nipheris Apr 19, 2023
dafe416
chore: update Node.js to 18.13.0 :arrow_up:
Nipheris Apr 19, 2023
267b155
chore: update pnpm to 8.3.1 and migrate lockfile to version 6.0 :arro…
Nipheris Apr 19, 2023
5f774bb
docs: rephrase package description
Nipheris Apr 19, 2023
c18baae
some hepler things like artifactory, fs and http
Apr 21, 2023
1a704b4
Merge remote-tracking branch 'origin/cli-and-config' into deb-repo-maker
Apr 21, 2023
2dfd854
conflicts resolved
Apr 21, 2023
991df40
moved some parts of deb logick
Apr 27, 2023
ba9d0d6
lot of deb builder functionality
May 15, 2023
6b15b16
make release file and sign it
May 16, 2023
445e2c7
lots of linter issues fixed
May 17, 2023
ceabe0c
refactoring: removing awaits from loops
May 19, 2023
67c678c
refactor: linter fix
May 19, 2023
459cb9c
use --no-tty for gpg
May 19, 2023
624f246
review notes fix
Jul 5, 2023
0e47e62
renamed to artifact-provider
origin-yaropolk Feb 7, 2024
fe35c00
s3-gk moved from dev deps to runtime deps
origin-yaropolk Feb 7, 2024
6c37179
discard mixin in config and remade using nested objects
origin-yaropolk Feb 7, 2024
6db3ea1
store prepeared repository root path for reuse
origin-yaropolk Feb 7, 2024
4a32567
adjust builder and artifact proviver to new s3gk api
origin-yaropolk Feb 16, 2024
048b092
use fs.promises
origin-yaropolk Feb 16, 2024
2e67c3b
use temp dir in cwd
origin-yaropolk Feb 16, 2024
4a80c1d
rename channel to distribution
origin-yaropolk Feb 16, 2024
0f0c7b4
review notes fix
origin-yaropolk Mar 15, 2024
69d541f
move artifactory related logic from deb builder to config
origin-yaropolk Mar 18, 2024
debc292
fix releases path, configure deb builder with package creator function
Mar 20, 2024
e1d71d5
don't deploy pub key
origin-yaropolk Mar 20, 2024
f664580
reexport public entities from index
Nipheris Mar 21, 2024
b058bdc
use .gitignore as ignore list for ESLint
Nipheris Mar 21, 2024
efc9f17
fix some linting errors
Nipheris Mar 21, 2024
9278fda
move DebBuilderConfig to deb-builder.mts
Nipheris Mar 21, 2024
01fa12b
rename path-containing properties in DebBuilder
Nipheris Mar 21, 2024
435e012
use parseInt instead of Number constructor
Nipheris Mar 21, 2024
1f62ea9
initial mac repo builder commit
origin-yaropolk Mar 22, 2024
3658895
Merge remote-tracking branch 'origin/mac-repo-maker' into windows-rep…
origin-yaropolk Mar 22, 2024
de0e5dc
windows repo maker remake
origin-yaropolk Mar 22, 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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
VOLTA_FEATURE_PNPM: 1
steps:
- uses: actions/checkout@v3
- name: Setup Volta and Node.js
uses: volta-cli/action@v3
- run: npx pnpm install
- run: npx pnpm build
- run: npx pnpm lint
- run: npx pnpm test
- run: pnpm install
- run: pnpm build
- run: pnpm lint
- run: pnpm test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ node_modules/

# build output directories
dist/
out/

# default output directory
out/

# coverage report directory
/coverage/

jewel-case.config.mjs
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx pnpm lint-staged
pnpm lint-staged
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shell-emulator=true
4 changes: 4 additions & 0 deletions .vscode/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Remove with your credits and rename file to .evn
ARTIFACTORY_HOST="artifactory.com"
ARTIFACTORY_USER="yaropolk"
ARTIFACTORY_API_KEY="1234"
49 changes: 49 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{

"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Start plan command",
"runtimeArgs": [
],
"program": "${workspaceFolder}/dist/cli.mjs",
"args": [
"plan"
]
},
{
"type": "node",
"request": "launch",
"name": "Start apply command",
"runtimeArgs": [
],
"program": "${workspaceFolder}/dist/cli.mjs",
"args": [
"apply"
]
},
{
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"env": {
"NODE_OPTIONS": "--experimental-vm-modules"
},
"args": [
"${workspaceRoot}/node_modules/jest/bin/jest",
"--runInBand",
"--no-coverage",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"jest.jestCommandLine": "pnpm src:test"
}
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this tasks file at all?

"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"group": "build",
"command": "pnpm build",
"problemMatcher": []
}
]
}
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# jewel-case

## Development
[Volta](https://volta.sh/) is recommended to install pinned version of Node. See `volta` field in the top-level [`package.json`](./package.json).
[Volta](https://volta.sh/) is recommended to install pinned versions of Node and pnpm. See `volta` field in the top-level [`package.json`](./package.json). Please also set `VOLTA_FEATURE_PNPM` environment variable to value `1`.

Lifecycle commands:
| Command | Description |
|--------------------------| ----------------------------------------|
| `npx pnpm install` | install all dependencies for a project |
| `npx pnpm husky install` | enable Git hooks |
| `npx pnpm build` | build everything |
| `npx pnpm lint` | lint all files |
| `npx pnpm lint-staged` | lint all staged files |
| `npx pnpm test` | run unit tests |
| `pnpm install` | install all dependencies for a project |
| `pnpm husky install` | enable Git hooks |
| `pnpm build` | build everything |
| `pnpm lint` | lint all files |
| `pnpm lint-staged` | lint all staged files |
| `pnpm src:test` | run unit tests |
| `pnpm tests:start` | run integration tests |
| `pnpm test` | run all tests |
14 changes: 6 additions & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import gitIgnore from 'eslint-config-flat-gitignore';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';

export default [
'eslint:all',
// 'plugin:@typescript-eslint/recommended',
{
ignores: [
'coverage/**',
'dist/**',
],
},
gitIgnore(),
{
rules: {
'array-element-newline': ['error', 'consistent'],
Expand All @@ -18,7 +14,7 @@ export default [
'comma-dangle': ['error', 'always-multiline'],
'dot-location': 'off',
'dot-notation': 'off',
'func-style': ['error', 'declaration'],
'func-style': 'off',
'function-call-argument-newline': ['error', 'consistent'],
'function-paren-newline': 'off',
'id-length': 'off',
Expand All @@ -40,6 +36,7 @@ export default [
'no-tabs': 'off',
'no-ternary': 'off',
'no-undefined': 'off',
'no-undef-init': 'off',
'no-underscore-dangle': 'off',
'object-curly-spacing': ['error', 'always'],
'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
Expand All @@ -49,7 +46,7 @@ export default [
'prefer-destructuring': 'off',
'quote-props': ['error', 'consistent-as-needed'],
'quotes': ['error', 'single'],
'sort-imports': ['error', { allowSeparatedGroups: true }],
'sort-imports': ['error', { allowSeparatedGroups: true, ignoreCase: true }],
'sort-keys': 'off',
'space-before-function-paren': ['error', 'never'],
},
Expand All @@ -59,6 +56,7 @@ export default [
'**/*.ts',
'**/*.cts',
'**/*.mts',
'**/*.mjs',
],
languageOptions: {
ecmaVersion: 2022,
Expand Down
24 changes: 24 additions & 0 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export default {
// A preset that is used as a base for Jest's configuration
preset: 'ts-jest/presets/default-esm',

// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,

// The number of seconds after which a test is considered as slow and reported as such in the results.
slowTestThreshold: 10,

extensionsToTreatAsEsm: ['.mts'],
resolver: '<rootDir>/../tools/mjs-resolver.cjs',
moduleFileExtensions: ['js', 'mjs', 'mts'],
testRegex: ['.*.spec.mts'],
transform: {
// to process mts with `ts-jest`
'^.+\\.mts$': [
'ts-jest',
{
useESM: true,
},
],
},
};
2 changes: 1 addition & 1 deletion lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
'*': 'ec',
'*.{js,cjs,mjs,ts,cts,mts}': 'cross-env ESLINT_USE_FLAT_CONFIG=true pnpm eslint -c eslint.config.mjs',
'*.{js,cjs,mjs,ts,cts,mts}': 'pnpm lint:eslint',
};
43 changes: 29 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
{
"type": "module",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we really need this in "dev" package.json?

"devDependencies": {
"@jest/globals": "^29.3.1",
"@tsconfig/node16-strictest-esm": "^1.0.3",
"@types/node": "16.18.1",
"@tsconfig/esm": "^1.0.2",
"@tsconfig/node18": "^2.0.0",
"@tsconfig/strictest": "^2.0.0",
"@types/ini": "^1.3.31",
"@types/node": "18.13.0",
"@types/tar": "^6.1.4",
"@types/yargs": "^17.0.16",
"@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^5.45.1",
"cross-env": "^7.0.3",
"editorconfig-checker": "^4.0.2",
"eslint": "^8.29.0",
"eslint-config-flat-gitignore": "^0.1.3",
"husky": "^8.0.0",
"jest": "^29.3.1",
"lint-staged": "^13.0.4",
"ts-jest": "^29.0.3",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.3"
"typescript": "^5.0.4"
},
"engines": {
"node": "^16.18.1",
"pnpm": "^7.17.1"
"node": "^18.13.0"
},
"packageManager": "pnpm@7.17.1",
"packageManager": "pnpm@8.3.1",
"private": true,
"scripts": {
"build": "pnpm build:src",
"build:src": "tsc --build src",
"lint": "pnpm lint:ec && pnpm lint:eslint",
"jest": "jest",
"build": "pnpm src:build",
"lint": "pnpm lint:ec && pnpm lint:eslint .",
"lint:ec": "ec",
"lint:eslint": "cross-env ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs .",
"test": "jest --passWithNoTests"
"lint:eslint": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs",
"test": "pnpm src:test && pnpm tests:start",
"src:build": "tsc --build src && node tools/package.mjs",
"src:test": "NODE_OPTIONS=--experimental-vm-modules jest --projects src",
"tests:start": "pnpm --filter ./tests start"
},
"volta": {
"node": "16.18.1"
"node": "18.13.0",
"pnpm": "8.3.1"
},
"dependencies": {
"ini": "^4.1.0",
"s3-groundskeeper": "0.3.1",
"tar": "^6.1.13",
"yargs": "^17.6.2"
}
}
Loading
Loading