metar-taf-parser 9.1.2 → 9.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -88,7 +88,7 @@ TAF reports are a little funky... FM, BECMG, PROB, weird validity periods, etc.
88
88
 
89
89
  #### `parseTAFAsForecast`
90
90
 
91
- Returns a more normalized TAF report than `parseTAF`. Most notably: while the `parseTAF` function returns initial weather conditions on the base of the returned result (and further conditions on `trends[]`), the `parseTAFAsForecast` function returns the initial weather conditions as the first element of the `forecast[]` property (with `type = undefined`), followed by subsequent trends. (For more, please see the above about the forecast abstraction.) This makes it much easier to render a UI similar to the [aviationweather.gov](https://www.aviationweather.gov/taf/data?ids=SBPJ&format=decoded&metars=off&layout=on) TAF decoder.
91
+ Returns a more normalized TAF report than `parseTAF`. Most notably: while the `parseTAF` function returns initial weather conditions on the base of the returned result (and further conditions on `trends[]`), the `parseTAFAsForecast` function returns the initial weather conditions as the first element of the `forecast[]` property (with `type = undefined`), followed by subsequent trends. (For more, please see the above about the forecast abstraction.) This makes it much easier to render a UI similar to the [aviationweather.gov](https://aviationweather.gov/data/taf/?decoded=1&ids=KMSN&metar=0&taf=1) TAF decoder.
92
92
 
93
93
  ```ts
94
94
  import { parseTAFAsForecast } from "metar-taf-parser";
@@ -127,7 +127,7 @@ declare enum TimeIndicator {
127
127
  TL = "TL"
128
128
  }
129
129
  /**
130
- * https://www.aviationweather.gov/taf/decoder
130
+ * https://web.archive.org/web/20230318235549/https://aviationweather.gov/taf/decoder
131
131
  */
132
132
  declare enum WeatherChangeType {
133
133
  /**
@@ -1593,4 +1593,5 @@ declare function parseTAF(rawTAF: string, options?: IMetarTAFParserOptions): ITA
1593
1593
  declare function parseTAF(rawTAF: string, options?: IMetarTAFParserOptionsDated): ITAFDated;
1594
1594
  declare function parseTAFAsForecast(rawTAF: string, options: IMetarTAFParserOptionsDated): IForecastContainer;
1595
1595
 
1596
- export { AltimeterUnit, CloudQuantity, CloudType, CommandExecutionError, DepositCoverage, DepositType, Descriptive, Direction, type Distance, DistanceUnit, type Forecast, type IAbstractTrend, type IAbstractValidity, type IAbstractWeatherCode, type IAbstractWeatherCodeDated, type IAbstractWeatherContainer, type IAltimeter, type IBaseRemark, type IBaseRunwayInfo, type IBaseTAFTrend, type ICeilingHeightRemark, type ICeilingSecondLocationRemark, type ICloud, type ICompositeForecast, type IEndValidity, type IFMValidity, type IFlags, type IForecastContainer, type IHourlyMaximumMinimumTemperatureRemark, type IHourlyMaximumTemperatureRemark, type IHourlyMinimumTemperatureRemark, type IHourlyPrecipitationAmountRemark, type IHourlyPressureRemark, type IHourlyTemperatureDewPointRemark, type IIceAccretionRemark, type IIcing, type IMetar, type IMetarDated, type IMetarTAFParserOptions, type IMetarTAFParserOptionsDated, type IMetarTrend, type IMetarTrendTime, type INextForecastByRemark, type INextForecastByRemarkDated, type IObscurationRemark, type IPrecipitationAmount24HourRemark, type IPrecipitationAmount36HourRemark, type IPrecipitationBegEndRemark, type IPrevailingVisibilityRemark, type IRunwayInfoDeposit, type IRunwayInfoRange, type ISeaLevelPressureRemark, type ISecondLocationVisibilityRemark, type ISectorVisibilityRemark, type ISmallHailSizeRemark, type ISnowIncreaseRemark, type ISnowPelletsRemark, type ISunshineDurationRemark, type ISurfaceVisibilityRemark, type ITAF, type ITAFDated, type ITafGroups, type ITemperature, type ITemperatureDated, type IThunderStormLocationMovingRemark, type IThunderStormLocationRemark, type ITime, type ITornadicActivityBegEndRemark, type ITornadicActivityBegRemark, type ITornadicActivityEndRemark, type ITowerVisibilityRemark, type ITurbulence, type IUnknownRemark, type IValidity, type IValidityDated, type IVariableSkyHeightRemark, type IVariableSkyRemark, type IVirgaDirectionRemark, type IWaterEquivalentSnowRemark, type IWeatherCondition, type IWind, type IWindPeakCommandRemark, type IWindShear, type IWindShiftFropaRemark, IcingIntensity, Intensity, InvalidWeatherStatementError, type Locale, MetarType, ParseError, PartialWeatherStatementError, Phenomenon, type Remark, type RemarkDated, RemarkType, type RunwayInfo, RunwayInfoTrend, RunwayInfoUnit, SpeedUnit, type TAFTrend, type TAFTrendDated, TimeIndicator, TimestampOutOfBoundsError, TurbulenceIntensity, UnexpectedParseError, ValueIndicator, type Visibility, WeatherChangeType, getCompositeForecastForDate, isWeatherConditionValid, parseMetar, parseTAF, parseTAFAsForecast };
1596
+ export { AltimeterUnit, CloudQuantity, CloudType, CommandExecutionError, DepositCoverage, DepositType, Descriptive, Direction, DistanceUnit, IcingIntensity, Intensity, InvalidWeatherStatementError, MetarType, ParseError, PartialWeatherStatementError, Phenomenon, RemarkType, RunwayInfoTrend, RunwayInfoUnit, SpeedUnit, TimeIndicator, TimestampOutOfBoundsError, TurbulenceIntensity, UnexpectedParseError, ValueIndicator, WeatherChangeType, getCompositeForecastForDate, isWeatherConditionValid, parseMetar, parseTAF, parseTAFAsForecast };
1597
+ export type { Distance, Forecast, IAbstractTrend, IAbstractValidity, IAbstractWeatherCode, IAbstractWeatherCodeDated, IAbstractWeatherContainer, IAltimeter, IBaseRemark, IBaseRunwayInfo, IBaseTAFTrend, ICeilingHeightRemark, ICeilingSecondLocationRemark, ICloud, ICompositeForecast, IEndValidity, IFMValidity, IFlags, IForecastContainer, IHourlyMaximumMinimumTemperatureRemark, IHourlyMaximumTemperatureRemark, IHourlyMinimumTemperatureRemark, IHourlyPrecipitationAmountRemark, IHourlyPressureRemark, IHourlyTemperatureDewPointRemark, IIceAccretionRemark, IIcing, IMetar, IMetarDated, IMetarTAFParserOptions, IMetarTAFParserOptionsDated, IMetarTrend, IMetarTrendTime, INextForecastByRemark, INextForecastByRemarkDated, IObscurationRemark, IPrecipitationAmount24HourRemark, IPrecipitationAmount36HourRemark, IPrecipitationBegEndRemark, IPrevailingVisibilityRemark, IRunwayInfoDeposit, IRunwayInfoRange, ISeaLevelPressureRemark, ISecondLocationVisibilityRemark, ISectorVisibilityRemark, ISmallHailSizeRemark, ISnowIncreaseRemark, ISnowPelletsRemark, ISunshineDurationRemark, ISurfaceVisibilityRemark, ITAF, ITAFDated, ITafGroups, ITemperature, ITemperatureDated, IThunderStormLocationMovingRemark, IThunderStormLocationRemark, ITime, ITornadicActivityBegEndRemark, ITornadicActivityBegRemark, ITornadicActivityEndRemark, ITowerVisibilityRemark, ITurbulence, IUnknownRemark, IValidity, IValidityDated, IVariableSkyHeightRemark, IVariableSkyRemark, IVirgaDirectionRemark, IWaterEquivalentSnowRemark, IWeatherCondition, IWind, IWindPeakCommandRemark, IWindShear, IWindShiftFropaRemark, Locale, Remark, RemarkDated, RunwayInfo, TAFTrend, TAFTrendDated, Visibility };
@@ -346,7 +346,7 @@ var TimeIndicator;
346
346
  TimeIndicator["TL"] = "TL";
347
347
  })(TimeIndicator || (TimeIndicator = {}));
348
348
  /**
349
- * https://www.aviationweather.gov/taf/decoder
349
+ * https://web.archive.org/web/20230318235549/https://aviationweather.gov/taf/decoder
350
350
  */
351
351
  var WeatherChangeType;
352
352
  (function (WeatherChangeType) {
@@ -2535,7 +2535,8 @@ class MetarParser extends AbstractParser {
2535
2535
  while (i < trendParts.length &&
2536
2536
  trendParts[i] !== this.TEMPO &&
2537
2537
  trendParts[i] !== this.INTER &&
2538
- trendParts[i] !== this.BECMG) {
2538
+ trendParts[i] !== this.BECMG &&
2539
+ trendParts[i] !== this.RMK) {
2539
2540
  if (trendParts[i].startsWith(this.FM) ||
2540
2541
  trendParts[i].startsWith(this.TL) ||
2541
2542
  trendParts[i].startsWith(this.AT)) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "metar-taf-parser",
3
- "version": "9.1.2",
3
+ "version": "9.1.3",
4
4
  "description": "Parse METAR and TAF reports",
5
5
  "homepage": "https://aeharding.github.io/metar-taf-parser",
6
- "packageManager": "pnpm@10.1.0+sha512.c89847b0667ddab50396bbbd008a2a43cf3b581efd59cf5d9aa8923ea1fb4b8106c041d540d08acb095037594d73ebc51e1ec89ee40c88b30b8a66c0fae0ac1b",
6
+ "packageManager": "pnpm@10.32.1+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be",
7
7
  "keywords": [
8
8
  "aviation",
9
9
  "weather",
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "type": "module",
17
17
  "main": "metar-taf-parser.js",
18
- "author": "Alexander Harding <2166114+aeharding@users.noreply.github.com>",
18
+ "author": "Alexander Harding <noreply@harding.dev>",
19
19
  "license": "MIT",
20
20
  "repository": {
21
21
  "type": "git",
@@ -29,8 +29,8 @@
29
29
  "check-types": "tsc --skipLibCheck --noEmit",
30
30
  "check-formatting": "prettier --check '**/*.{js,json,css,md,scss,tsx,ts}'",
31
31
  "watch": "watch 'pnpm build' src",
32
- "test": "jest --coverage",
33
- "test-watch": "jest --watch --coverage",
32
+ "test": "vitest run --coverage",
33
+ "test-watch": "vitest --coverage",
34
34
  "prepublishOnly": "pnpm clean && pnpm build",
35
35
  "upgrade:packageManager": "corepack use pnpm@latest"
36
36
  },
@@ -39,23 +39,19 @@
39
39
  "metar-taf-parser.*"
40
40
  ],
41
41
  "devDependencies": {
42
- "@babel/preset-env": "^7.26.0",
43
- "@babel/preset-typescript": "^7.26.0",
44
- "@rollup/plugin-typescript": "^12.1.2",
45
- "@types/jest": "^29.5.14",
46
- "@types/lodash": "^4.17.14",
47
- "@types/node": "^22.10.5",
48
- "jest": "^29.7.0",
49
- "lodash": "^4.17.21",
50
- "prettier": "^3.4.2",
51
- "rimraf": "^6.0.1",
52
- "rollup": "^4.29.2",
53
- "rollup-plugin-dts": "^6.1.1",
54
- "ts-jest": "^29.2.5",
42
+ "@rollup/plugin-typescript": "^12.3.0",
43
+ "@types/node": "^25.5.0",
44
+ "@vitest/coverage-v8": "^4.1.0",
45
+ "es-toolkit": "^1.45.1",
46
+ "prettier": "^3.8.1",
47
+ "rimraf": "^6.1.3",
48
+ "rollup": "^4.59.0",
49
+ "rollup-plugin-dts": "^6.4.0",
55
50
  "ts-node": "^10.9.2",
56
- "tsc-alias": "^1.8.10",
51
+ "tsc-alias": "^1.8.16",
57
52
  "tslib": "^2.8.1",
58
- "typescript": "^5.7.2",
53
+ "typescript": "^5.9.3",
54
+ "vitest": "^4.1.0",
59
55
  "watch": "^1.0.2"
60
56
  }
61
57
  }