Make require() compliant with CommonJS 1.0

This includes potentially breaking changes.
  Specifically, before this patch tiddlywiki would default to relative module identifiers
  Now, tiddlywiki will only search relative paths if explicitly specified
  Additionally, some "defaulted export contexts" were removed
    (some modules may make assumptions about context)
Some unit tests were modified slightly from their originals
  Tiddlywiki doesn't have a notion of a "main" program's path
  Some require calls were explicitly made relative
  None of these changes should affect the requirement under test in each case
This commit is contained in:
natecain
2013-09-17 20:20:37 -04:00
parent 7f3000aaae
commit 881325b7ed
32 changed files with 493 additions and 16 deletions

View File

@@ -0,0 +1,14 @@
/*\
title: determinism/program.js
type: application/javascript
module-type: library
Determinism test
\*/
var test = require('test');
require('submodule/a');
test.print('DONE', 'info');