Skip to content
Open
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
2,874 changes: 2,372 additions & 502 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/airtable-syncer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shiftcode/airtable-syncer",
"version": "1.0.1",
"version": "1.0.2-pr7.1",
"description": "base utils and services to export airtable and upload to S3",
"repository": "https://github.com/shiftcode/sc-commons-public",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class AirtableFetcher {
}

/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
const cachedRecordsMap: Map<string, AirtableIdRecord> = <any>this.cache.get(map.tableName)!.items
const cachedRecordsMap: Map<string, AirtableIdRecord> = this.cache.get(map.tableName)!.items

if (ids && Array.isArray(ids) && ids.length) {
// filter only required ids
Expand Down
2 changes: 1 addition & 1 deletion packages/branch-utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shiftcode/branch-utilities",
"version": "6.0.0",
"version": "6.1.0-pr7.3",
"description": "Utilities for local and ci to get branch name and stage",
"repository": "https://github.com/shiftcode/sc-commons-public",
"license": "MIT",
Expand Down
26 changes: 19 additions & 7 deletions packages/branch-utilities/src/lib/base.utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ describe('base utils', () => {
SC_OVERRIDE_BRANCH_NAME: undefined,
SC_OVERRIDE_IS_PR: undefined,
}
expect(getBranchInfo(env, 'master')).toEqual(<BranchInfo>{
expect(getBranchInfo(env, 'master')).toEqual({
stage: 'master',
isPr: false,
isProd: true,
name: 'master',
branchName: 'master',
})
} satisfies BranchInfo)
})

test('works locally when not master', () => {
Expand Down Expand Up @@ -53,9 +53,9 @@ describe('base utils', () => {
const env: Partial<GithubActionEnv & CustomGitHubContext> = {
GITHUB_ACTIONS: 'true',
GITHUB_EVENT_NAME: 'push',
GITHUB_CONTEXT: JSON.stringify(<Partial<GitHubContext>>{
GITHUB_CONTEXT: JSON.stringify({
ref: 'refs/heads/master',
}),
} satisfies Partial<GitHubContext>),
}
expect(getBranchInfo(env)).toEqual({
branchName: 'master',
Expand All @@ -72,13 +72,13 @@ describe('base utils', () => {
SC_OVERRIDE_BRANCH_NAME: '#1313-on-branch-to-override-them-all',
SC_OVERRIDE_IS_PR: 'true',
}
expect(getBranchInfo(env, 'master')).toEqual(<BranchInfo>{
expect(getBranchInfo(env, 'master')).toEqual({
stage: 'pr1313',
isPr: true,
isProd: false,
name: 'on-branch-to-override-them-all',
branchName: '#1313-on-branch-to-override-them-all',
})
} satisfies BranchInfo)
})
})

Expand All @@ -94,6 +94,16 @@ describe('base utils', () => {

expect(parseBranchName('#72- whatever').branchId).toBe(72)
expect(parseBranchName('feature/#72-ok').branchId).toBe(72)
expect(parseBranchName('1-foobar')).toEqual({ branchId: 1, branchName: 'foobar' } satisfies ReturnType<
typeof parseBranchName
>)
expect(parseBranchName('feat/42-foo-bar-baz')).toEqual({
branchId: 42,
branchName: 'foo-bar-baz',
} satisfies ReturnType<typeof parseBranchName>)
expect(parseBranchName('007-oh-james')).toEqual({ branchId: 7, branchName: 'oh-james' } satisfies ReturnType<
typeof parseBranchName
>)
})

test('works for github copilot created branches', () => {
Expand All @@ -107,8 +117,10 @@ describe('base utils', () => {

test('throws when invalid pattern', () => {
expect(() => parseBranchName('whrjwe')).toThrow()
expect(() => parseBranchName('copilot/123-fix')).toThrow()
expect(() => parseBranchName('feat/copilot/fix-123')).toThrow()
expect(() => parseBranchName('/42-foo')).toThrow()
expect(() => parseBranchName('fix-7-issues')).toThrow()
expect(() => parseBranchName('fix7-issues')).toThrow()
})
})

Expand Down
4 changes: 2 additions & 2 deletions packages/branch-utilities/src/lib/base.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const REGEX_MAIN = /^main$/
* @example #123-my-feature -> { id: '123', name: 'my-feature' }
* @example feature/#456-yanr -> { id: '456', name: 'yanr' }
*/
const REGEX_BRANCH_NAME_DEFAULT = /^[a-z]*\/?#(?<id>\d+)-(?<name>.*)$/
const REGEX_BRANCH_NAME_DEFAULT = /^(?:[a-z]+\/)?#?(?<id>\d+)-(?<name>.*)$/
/**
* regex to match the branch convention github copilot uses with the following named capture groups: id, name
* @example copilot/fix-789 -> { id: '789', name: 'fix' }
Expand Down Expand Up @@ -153,7 +153,7 @@ export function parseBranchName(branchName: string): { branchId: number; branchN
}
} else {
throw new Error(
`given branch name ${branchName} does not match our convention #<one or more digit>-<branch-name-with-kebap-case>`,
`given branch name ${branchName} does not match our convention #<one or more digit>-<branch-name-with-kebap-case> (# is optional, feat/123-foo-bar is also valid)`,
)
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-config-recommended/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shiftcode/eslint-config-recommended",
"version": "7.0.0",
"version": "8.0.0-pr7.1",
"description": "default shiftcode config for eslint",
"repository": "https://github.com/shiftcode/sc-commons-public",
"license": "MIT",
Expand Down Expand Up @@ -28,19 +28,19 @@
},
"dependencies": {
"@eslint/js": "^9.37.0",
"@shiftcode/eslint-plugin-rules": "^6.0.0",
"@shiftcode/eslint-plugin-rules": "^6.0.1-pr7.0",
"eslint": "^9.37.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.2.0",
"typescript-eslint": "8.46.0"
"eslint-plugin-unused-imports": "^4.4.1",
"typescript-eslint": "8.67.0"
},
"devDependencies": {
"angular-eslint": "^20.5.1"
"angular-eslint": "~21.3.1"
},
"peerDependencies": {
"angular-eslint": "^20.5.1 || ^21.0.0"
"angular-eslint": "^21.3.0 || ^22.0.0"
Comment thread
mumenthalers marked this conversation as resolved.
},
"peerDependenciesMeta": {
"angular-eslint": {
Expand Down
5 changes: 4 additions & 1 deletion packages/eslint-config-recommended/src/angular/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export function defineScAngularConfig(...configs: Parameters<typeof defineConfig
return defineScTsConfig(
{
files: ['**/*.ts'],
// @ts-expect-error angular fck it up
extends: [eslintAngular.configs.tsRecommended],
processor: eslintAngular.processInlineTemplates,
rules: {
Expand All @@ -45,9 +44,11 @@ export function defineScAngularConfig(...configs: Parameters<typeof defineConfig
'@angular-eslint/sort-lifecycle-methods': 'error',
'@angular-eslint/no-lifecycle-call': 'error',
'@angular-eslint/prefer-output-readonly': 'error',
'@angular-eslint/prefer-output-emitter-ref': 'error',
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/prefer-host-metadata-property': 'error',
'@angular-eslint/no-queries-metadata-property': 'error',
'@angular-eslint/computed-must-return': 'error',

'@angular-eslint/use-lifecycle-interface': 'error',
'@angular-eslint/use-pipe-transform-interface': 'error',
Expand Down Expand Up @@ -93,6 +94,8 @@ export function defineScAngularConfig(...configs: Parameters<typeof defineConfig
'@angular-eslint/template/no-negated-async': 'error',
'@angular-eslint/template/no-empty-control-flow': 'error',
'@angular-eslint/template/prefer-at-empty': 'error',
'@angular-eslint/template/prefer-class-binding': 'error',
Comment thread
mumenthalers marked this conversation as resolved.
'@angular-eslint/template/no-non-null-assertion': 'error',

// some very basic a11y rules
'@angular-eslint/template/elements-content': 'error',
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-recommended/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export function defineScTsConfig(...configs: Parameters<typeof defineConfig>): R
'simple-import-sort/exports': 'error',
'no-console': 'error',
'max-classes-per-file': 'error',
'object-shorthand': 'error',
curly: 'error',
eqeqeq: 'error',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-rules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shiftcode/eslint-plugin-rules",
"version": "6.0.0",
"version": "6.0.1-pr7.0",
"description": "eslint-rules for shiftcode-specific eslint rules",
"repository": "https://github.com/shiftcode/sc-commons-public",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const prefixBuiltinModuleImportRule = createScRule({
const testAndReportModulePathOnNode = (node: TSESTree.Node, path: string) => {
if (builtinModules.includes(path)) {
context.report({
node: node,
node,
messageId: PrefixNodeModuleImportMessageIds.USE_NODE_PREFIX_FOR_BUILTIN_MODULE,
data: { path },
fix: (fixer) => fixer.replaceText(node, `'node:${path}'`),
Expand Down
4 changes: 2 additions & 2 deletions packages/iac-utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shiftcode/iac-utilities",
"version": "1.0.1",
"version": "1.0.2-pr7.3",
"description": "scripts and util functions for aws iac",
"repository": "https://github.com/shiftcode/sc-commons-public",
"license": "MIT",
Expand Down Expand Up @@ -54,7 +54,7 @@
"@aws-sdk/client-s3": "^3.204.0",
"@aws-sdk/credential-providers": "^3.204.0",
"@aws-sdk/types": "^3.201.0",
"@shiftcode/branch-utilities": "^6.0.0",
"@shiftcode/branch-utilities": "^6.1.0-pr7.3",
"@shiftcode/lambda-utilities": "^1.0.1",
"@types/yargs": "^17.0.5"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/publish-helper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shiftcode/publish-helper",
"version": "6.0.0",
"version": "6.0.1-pr7.3",
"description": "scripts for conventional (pre)releases",
"repository": "https://github.com/shiftcode/sc-commons-public",
"license": "MIT",
Expand All @@ -25,7 +25,7 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@shiftcode/branch-utilities": "^6.0.0",
"@shiftcode/branch-utilities": "^6.1.0-pr7.3",
"@types/yargs": "^17.0.32"
},
"peerDependencies": {
Expand Down