Skip to content

Commit

Permalink
Merge branch 'master' into proposed-enhancement-regex-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ckcherry23 committed Jan 26, 2024
2 parents 9df3b31 + c2ac8d1 commit 14d06bf
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/dg/settingUp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<box type="info" seamless>

Type `java -version`, `npm -v` and `git --version` respectively on your OS terminal and ensure that you have the correct version of each prerequisite installed.
Type `java -version`, `node -v` and `git --version` respectively on your OS terminal and ensure that you have the correct version of each prerequisite installed.
</box>

<!-- ==================================================================================================== -->
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/c-segment-collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script lang='ts'>
import { defineComponent } from 'vue';
import cSegment from './c-segment.vue';
import Segment from '../utils/segment';
import { AuthorshipFileSegment } from '../types/types';
export default defineComponent({
name: 'c-segment-collection',
Expand All @@ -16,7 +16,7 @@ export default defineComponent({
},
props: {
segments: {
type: Array<Segment>,
type: Array<AuthorshipFileSegment>,
required: true,
},
path: {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/c-segment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
</template>

<script lang='ts'>
import { defineComponent } from 'vue';
import { defineComponent, PropType } from 'vue';
import { mapState } from 'vuex';
import Segment from '../utils/segment';
import { StoreState } from '../types/vuex.d';
import { AuthorshipFileSegment } from '../types/types';
export default defineComponent({
name: 'c-segment',
props: {
segment: {
type: Segment,
type: Object as PropType<AuthorshipFileSegment>,
required: true,
},
path: {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/c-summary-charts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ export default defineComponent({
getBaseTarget(target: HTMLElement | null): HTMLElement | null {
if (!target) {
// Should never reach here - function assumes that target is a child of the div with class 'summary-chart__ramp'
// eslint-disable-next-line no-console
console.error('Error: The getBaseTarget function in c-summary-charts.vue has been called on an element that is '
+ 'not a child of the div with class summary-chart__ramp. This might affect the drag view functionality.');
return null;
Expand Down
13 changes: 0 additions & 13 deletions frontend/src/utils/segment.ts

This file was deleted.

15 changes: 7 additions & 8 deletions frontend/src/views/c-authorship.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,10 @@ import minimatch from 'minimatch';
import brokenLinkDisabler from '../mixin/brokenLinkMixin';
import tooltipPositioner from '../mixin/dynamicTooltipMixin';
import cSegmentCollection from '../components/c-segment-collection.vue';
import Segment from '../utils/segment';
import getNonRepeatingColor from '../utils/random-color-generator';
import { StoreState } from '../types/vuex.d';
import { FileResult, Line } from '../types/zod/authorship-type';
import { AuthorshipFile } from '../types/types';
import { AuthorshipFile, AuthorshipFileSegment } from '../types/types';
import { FilesSortType, FilterType } from '../types/authorship';
const filesSortDict = {
Expand Down Expand Up @@ -518,11 +517,11 @@ export default defineComponent({
return name === '-';
},
splitSegments(lines: Line[]): { segments: Segment[]; blankLineCount: number; } {
splitSegments(lines: Line[]): { segments: AuthorshipFileSegment[]; blankLineCount: number; } {
// split into segments separated by knownAuthor
let lastState: string | null;
let lastId = -1;
const segments: Segment[] = [];
const segments: AuthorshipFileSegment[] = [];
let blankLineCount = 0;
lines.forEach((line, lineCount) => {
Expand All @@ -532,11 +531,11 @@ export default defineComponent({
const knownAuthor = (line.author && isAuthorMatched) ? line.author.gitId : null;
if (knownAuthor !== lastState || lastId === -1) {
segments.push(new Segment(
segments.push({
knownAuthor,
[],
[],
));
lineNumbers: [],
lines: [],
});
lastId += 1;
lastState = knownAuthor;
Expand Down

0 comments on commit 14d06bf

Please sign in to comment.