frictionlessdata / datapackage-js

A JavaScript library for working with Data Package.
http://frictionlessdata.io/
MIT License
42 stars 15 forks source link

Infer doesn't lowercase resource names #118

Open pripley123 opened 2 years ago

pripley123 commented 2 years ago

Overview

According to https://specs.frictionlessdata.io/data-resource/#metadata-properties it appears that resource name must be lowercase. When using the infer command it appears that the inspected value only removes the extension and does not lowercase the resource name (inspection.name = pathModule.basename(path[0], .${inspection.format}) (line 579 in src/resource.js). Hence MyFile.csv would have an inferred resource name of MyFile as opposed to myfile which produces invalid package error if you commit to it. Wondering if there's a reason no lower casing is occurring?


Please preserve this line to notify @aivuk (lead of this repository)

aivuk commented 2 years ago

Thanks for reporting it, looks like a bug. As soon as I fix it I will ping you here.