Skip to content

Commit

Permalink
0.1.0 - Added .js to relative module paths (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ponlawat-w authored Dec 9, 2023
1 parent 21b67c2 commit 16131d0
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Updated translation
Added .js to relative module paths
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gtfs-io",
"type": "module",
"version": "0.0.10",
"version": "0.1.0",
"description": "IO operations for reading and writing GTFS datasets and GTFS type definitions.",
"main": "dist/index.js",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/feed/base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GTFS_FILES } from '../file-info';
import { GTFS_FILES } from '../file-info.js';
import type { GTFSTableName } from '../file-info';
import type { GTFSAgency } from '../files/agency';
import type { GTFSArea } from '../files/area';
Expand Down
4 changes: 2 additions & 2 deletions src/feed/iterable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GTFSFeedBase } from './base';
import { GTFSLoadedFeed } from './loaded';
import { GTFSFeedBase } from './base.js';
import { GTFSLoadedFeed } from './loaded.js';
import type { GTFSTableName } from '../file-info';
import type { GTFSAsyncFileRecords, GTFSFileRecords, GTFSFileRow } from '../types';

Expand Down
4 changes: 2 additions & 2 deletions src/feed/loaded.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GTFSFeedBase } from './base';
import { GTFSAsyncIterableFeed, GTFSIterableFeed } from './iterable';
import { GTFSFeedBase } from './base.js';
import { GTFSAsyncIterableFeed, GTFSIterableFeed } from './iterable.js';
import type { GTFSTableName } from '../file-info';
import type { GTFSFileRow } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion src/files/translation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GTFSTableName } from '../file-info';
import type { GTFSTableName } from '../file-info';

type TranslationByRecordID = {
/** Defines the record that corresponds to the field to be translated. */
Expand Down
2 changes: 1 addition & 1 deletion src/files/trip.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GTFSWheelchairAccessbility } from './common';
import type { GTFSWheelchairAccessbility } from './common';

/** Indicates the direction of travel for a trip. */
export enum GTFSTripDirection {
Expand Down
40 changes: 20 additions & 20 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export { GTFSFileIO, GTFSAsyncFileIO } from './io/file';
export * from './io/feed-file';
export { GTFSFeedReader, GTFSAsyncFeedReader } from './io/feed-reader';
export { GTFSFeedWriter, GTFSAsyncFeedWriter } from './io/feed-writer';
export { GTFSFileIO, GTFSAsyncFileIO } from './io/file.js';
export * from './io/feed-file.js';
export { GTFSFeedReader, GTFSAsyncFeedReader } from './io/feed-reader.js';
export { GTFSFeedWriter, GTFSAsyncFeedWriter } from './io/feed-writer.js';

export * from './feed/iterable';
export * from './feed/loaded';
export * from './file-info';
export * from './feed/iterable.js';
export * from './feed/loaded.js';
export * from './file-info.js';

export { GTFSCalendarDateException } from './files/calendar-date';
export { GTFSCalendarAvailability } from './files/calendar';
export { GTFSContinuousPickupDropOff, GTFSWheelchairAccessbility } from './files/common';
export { GTFSFareAttributePaymentMethod, GTFSFareAttributeTransfer } from './files/fare-attribute';
export { GTFSFareMediaType } from './files/fare-media';
export { GTFSFareTransferRuleDurationLimit, GTFSFareTransferRuleType } from './files/fare-transfer-rule';
export { GTFSFrequncyExactTimes } from './files/frequency';
export { GTFSPathwayMode, GTFSPathwayDirection } from './files/pathway';
export { GTFSRouteType } from './files/route';
export { GTFSStopTimePickupDropOff, GTFSStopTimeTimepoint } from './files/stop-time';
export { GTFSStopLocationType } from './files/stop';
export { GTFSTranferType } from './files/transfer';
export { GTFSTripDirection, GTFSTripBikesAllowed } from './files/trip';
export { GTFSCalendarDateException } from './files/calendar-date.js';
export { GTFSCalendarAvailability } from './files/calendar.js';
export { GTFSContinuousPickupDropOff, GTFSWheelchairAccessbility } from './files/common.js';
export { GTFSFareAttributePaymentMethod, GTFSFareAttributeTransfer } from './files/fare-attribute.js';
export { GTFSFareMediaType } from './files/fare-media.js';
export { GTFSFareTransferRuleDurationLimit, GTFSFareTransferRuleType } from './files/fare-transfer-rule.js';
export { GTFSFrequncyExactTimes } from './files/frequency.js';
export { GTFSPathwayMode, GTFSPathwayDirection } from './files/pathway.js';
export { GTFSRouteType } from './files/route.js';
export { GTFSStopTimePickupDropOff, GTFSStopTimeTimepoint } from './files/stop-time.js';
export { GTFSStopLocationType } from './files/stop.js';
export { GTFSTranferType } from './files/transfer.js';
export { GTFSTripDirection, GTFSTripBikesAllowed } from './files/trip.js';

export type * from './file-info';
export type * from './types';
Expand Down
4 changes: 2 additions & 2 deletions src/io/feed-file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GTFSAsyncFileIO, GTFSFileIO } from './file';
import { GTFS_FILES } from '../file-info';
import { GTFSAsyncFileIO, GTFSFileIO } from './file.js';
import { GTFS_FILES } from '../file-info.js';
import type { GTFSFileInfo } from '../file-info';
import type { GTFSFileRow } from '../types';
import type { GTFSAgency } from '../files/agency';
Expand Down
10 changes: 5 additions & 5 deletions src/io/feed-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
readSync as readFileSync
} from 'fs';
import { join as joinPath } from 'path';
import { getAsyncIOFromFileName, getIOFromFileName } from './feed-file';
import { getGTFSFileInfos } from '../file-info';
import { GTFSFeedBase } from '../feed/base';
import { GTFSLoadedFeed } from '../feed/loaded';
import { GTFSAsyncIterableFeed, GTFSIterableFeed } from '../feed/iterable';
import { getAsyncIOFromFileName, getIOFromFileName } from './feed-file.js';
import { getGTFSFileInfos } from '../file-info.js';
import { GTFSFeedBase } from '../feed/base.js';
import { GTFSLoadedFeed } from '../feed/loaded.js';
import { GTFSAsyncIterableFeed, GTFSIterableFeed } from '../feed/iterable.js';
import type { GTFSFileInfo } from '../file-info';
import type { GTFSAsyncFileRecords, GTFSFileContent, GTFSFileRecords } from '../types';

Expand Down
6 changes: 3 additions & 3 deletions src/io/feed-writer.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import AdmZip from 'adm-zip';
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
import { join as joinPath } from 'path';
import { getAsyncIOFromFileName, getIOFromFileName } from './feed-file';
import { GTFSAsyncIterableFeed, GTFSIterableFeed } from '../feed/iterable';
import { GTFSLoadedFeed } from '../feed/loaded';
import { getAsyncIOFromFileName, getIOFromFileName } from './feed-file.js';
import { GTFSAsyncIterableFeed, GTFSIterableFeed } from '../feed/iterable.js';
import { GTFSLoadedFeed } from '../feed/loaded.js';
import type { GTFSFileContent } from '../types';

/**
Expand Down
4 changes: 2 additions & 2 deletions src/io/file.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getInitialReadChunkParams, readChunk } from './reader';
import { getInitialWriteChunkParams, getRecordsHeader, writeRecords } from './writer';
import { getInitialReadChunkParams, readChunk } from './reader.js';
import { getInitialWriteChunkParams, getRecordsHeader, writeRecords } from './writer.js';
import type { GTFSIOWriteOptions } from './types';
import type { GTFSFileInfo } from '../file-info';
import type { GTFSAsyncFileRecords, GTFSFileRecords, GTFSFileRow } from '../types';
Expand Down

0 comments on commit 16131d0

Please sign in to comment.