Skip to content

Commit

Permalink
Merge #373: Release 1.0.2
Browse files Browse the repository at this point in the history
5864d80 fix: [#183] update node dependencies (Jose Celano)
7be1aec fix: [#183] update gh actions (Jose Celano)
8cf3e00 fix: [#369] megalinter djlint errors (Jose Celano)
1a40390 fix: [#369] megalinter copypaste errors (Jose Celano)

Pull request description:

ACKs for top commit:
  da2ce7:
    ACK 3974a18

Tree-SHA512: 8de64037268e125fe7c19a7b4cf5950b4a7a62ed669abd43bbf88c41560b1471c79aabde3247ce83737618d2749ab190976a31c267e7d12e3828dea97739d615
  • Loading branch information
josecelano committed Oct 24, 2022
2 parents 5998f8f + 3974a18 commit 7b7df3b
Show file tree
Hide file tree
Showing 18 changed files with 1,363 additions and 465 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"Constantin",
"Cyberneering",
"Delimeter",
"DJLINT",
"dotenv",
"endgroup",
"eslintcache",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3.4.1
uses: actions/setup-node@v3.5.1
with:
node-version: 16.x

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4.1.0
uses: actions/setup-python@v4.3.0
with:
python-version: '3.9'

Expand Down
8 changes: 4 additions & 4 deletions .jscpd.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"**/cinder/**",
"**/node_modules/**",
"**/report/**",
"coverage/**",
"dist/**",
"lib/**",
"README.md"
"**/coverage/**",
"**/dist/**",
"**/lib/**",
"**/README.md"
]
}
1 change: 1 addition & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ JAVASCRIPT_STANDARD_FILTER_REGEX_EXCLUDE: (dist|cinder)
TYPESCRIPT_ES_FILTER_REGEX_EXCLUDE: dist
HTML_HTMLHINT_FILTER_REGEX_EXCLUDE: cinder
CSS_STYLELINT_FILTER_REGEX_EXCLUDE: cinder
HTML_DJLINT_FILTER_REGEX_EXCLUDE: cinder
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
10 changes: 5 additions & 5 deletions __tests__/unit/commit-body.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should not accept a body without the mandatory namespace field', () => {
Expand All @@ -40,7 +40,7 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should not accept a body with a wrong namespace value', () => {
Expand All @@ -57,7 +57,7 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should not accept a body without the mandatory metadata field', () => {
Expand All @@ -70,14 +70,14 @@ describe('CommitBody', () => {
})
)
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('should fail when constructing with a non-JSON content', () => {
const invalidContent = (): CommitBody => {
return new CommitBody('this is not a JSON content')
}
expect(invalidContent).toThrowError()
expect(invalidContent).toThrow()
})

it('could be built from a Message', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unit/commit-hash.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe('CommitHash', () => {
return new CommitHash('ad5cea63-8f69d-955d8-e5f0da-9f675d5ba75f')
}

expect(longHash).toThrowError()
expect(shortHash).toThrowError()
expect(nonSHA1Hash).toThrowError()
expect(longHash).toThrow()
expect(shortHash).toThrow()
expect(nonSHA1Hash).toThrow()
})

it('should compare two commit hashes', () => {
Expand Down
10 changes: 5 additions & 5 deletions __tests__/unit/commit-subject-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('CommitSubjectParser', () => {
return parser.getMessageKey().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should parse the queue name from a commit subject', () => {
Expand All @@ -38,7 +38,7 @@ describe('CommitSubjectParser', () => {
return parser.getQueueName().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should parse the job reference (commit hash) from a commit subject', () => {
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('CommitSubjectParser', () => {
return parser.getJobRef().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should fail when the job reference prefix exists but the reference value is missing in a commit subject', () => {
Expand All @@ -77,7 +77,7 @@ describe('CommitSubjectParser', () => {
return parser.getJobRef().toString()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should return a Null Commit when the job reference does not exist', () => {
Expand All @@ -96,7 +96,7 @@ describe('CommitSubjectParser', () => {
return parser.getJobId()
}

expect(fn).toThrowError()
expect(fn).toThrow()
})

it('should parse the job id from a commit subject', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unit/job-id.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ describe('JobId', () => {
return new JobId(0)
}

expect(negativeJobId).toThrowError()
expect(NaNJobId).toThrowError()
expect(zeroJobId).not.toThrowError()
expect(negativeJobId).toThrow()
expect(NaNJobId).toThrow()
expect(zeroJobId).not.toThrow()
})

it('should compare two JobIds', () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unit/queue-name.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ describe('QueueName', () => {
)
}

expect(invalidCharacters).toThrowError()
expect(emptyString).toThrowError()
expect(longString).toThrowError()
expect(invalidCharacters).toThrow()
expect(emptyString).toThrow()
expect(longString).toThrow()
})

it('should transform blank spaces of the queue name into dashes', () => {
Expand Down
10 changes: 5 additions & 5 deletions __tests__/unit/queue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('Queue', () => {

const expectedError = `Can't start job. Previous message from this job is not a new job message. Previous message commit: --no-commit-hash--`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should fail when trying to start the same job twice', async () => {
Expand All @@ -140,7 +140,7 @@ describe('Queue', () => {
return queue.markJobAsStarted(dummyPayload())
}

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should allow marking a job as finished', async () => {
Expand Down Expand Up @@ -194,7 +194,7 @@ describe('Queue', () => {

const expectedError = `Can't finish job. Previous message from this job is not a job started message. Previous message commit: --no-commit-hash--`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should fail when trying to finish a job that does not exists', async () => {
Expand All @@ -207,7 +207,7 @@ describe('Queue', () => {

const expectedError = `Can't finish job. Previous message from this job is not a job started message. Previous message commit: --no-commit-hash--`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should allow to specify the commit author', async () => {
Expand Down Expand Up @@ -260,7 +260,7 @@ describe('Queue', () => {

const expectedError = `Git dir: ${gitRepo.getDirPath()} has not been initialized`

await expect(fn()).rejects.toThrowError(expectedError)
await expect(fn()).rejects.toThrow(expectedError)
})

it('should return all the messages in the queue', async () => {
Expand Down
Loading

0 comments on commit 7b7df3b

Please sign in to comment.