dojo / dojo/dojo1-dmodel

building with json-schema

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
30
Forks
6
PR merge metrics
No merged PRs in 30d

Description

the build automatically discovers the json-schema package.json and [sets the location for json-schema to be json-schema/lib](https://github.com/dojo/util/blob/ea63ffae5e87d36bde8fd9931bcb35fb5bf3ca9f/build/buildControl.js#L255) based on the `"directories"` directive in the package.json. this causes the json-schema/lib/validate dependency to cause an error for the build since the build resolves that as json-schema/lib/lib/validate.

not sure what to do about this...
1. use json-schema/validate as the dependency but configure the loader to set the location for the json-schema package to be json-schema/lib. this is not ideal since the default loader config won't work.
2. change json-schema's package.json so that the build discovers json-schema/lib/validate as expected. this is not ideal since other node packages probably already rely on the `"directories"` directive.
3. instruct people to include the following in their build profile - which is also not ideal since the default build profile config won't work.

``` js
{
name: 'json-schema',
location: 'json-schema',
resourceTags: {
amd: function (filename) {
return /\/lib\/(?:links|validate)\.js$/.test(filename);
}
}
},
```

i guess this issue could probably belong in the json-schema repo but i'm reporting it here in the hope that adopters of dmodel will find this issue before complaining about how it isn't working.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the build failure for json-schema/lib/validate, then inspect build/buildControl.js around the linked line and json-schema/package.json's directories directive. Done means selecting a resolution and confirming that the build resolves the dependency correctly without an unexplained path error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.