bevry / cson

CoffeeScript-Object-Notation. Same as JSON but for CoffeeScript objects.
Other
1.34k stars 55 forks source link

requiring CSON in every version after v1.6.2 returns an empty object #59

Closed dogancelik closed 7 years ago

dogancelik commented 9 years ago

This started to happen a few days ago? I don't know what's going on, I uninstalled npm, nodejs, deleted cache directories and everything else, then installed iojs to test, still no luck.

When installing and using 1.6.2:

dogan@DOGAN-PC D:\Projects\Node\projectname
$ npm install cson@1.6.2
-
> cson@1.6.2 preinstall D:\Projects\Node\projectname\node_modules\cson
> node ./cyclic.js

|
> ambi@2.2.0 preinstall D:\Projects\Node\projectname\node_modules\cson\node_modules\ambi
> node ./cyclic.js

\

> js2coffee@0.3.5 preinstall D:\Projects\Node\projectname\node_modules\cson\node_modules\js2coffee
> node ./cyclic.js

/

> typechecker@2.0.8 preinstall D:\Projects\Node\projectname\node_modules\cson\node_modules\extract-opts\node_modules\typechecker
> node ./cyclic.js

-

> typechecker@2.0.8 preinstall D:\Projects\Node\projectname\node_modules\cson\node_modules\ambi\node_modules\typechecker
> node ./cyclic.js

cson@1.6.2 node_modules\cson
├── requirefresh@1.1.2
├── coffee-script@1.8.0 (mkdirp@0.3.5)
├── extract-opts@2.2.0 (typechecker@2.0.8)
├── ambi@2.2.0 (typechecker@2.0.8)
└── js2coffee@0.3.5 (file@0.2.2, underscore@1.6.0, coffee-script@1.7.1, nopt@3.0.1)

dogan@DOGAN-PC D:\Projects\Node\projectname
$ coffee
coffee> require 'cson'
{ parseFile: [Function],
  parseFileSync: [Function],
  parse: [Function],
  parseSync: [Function],
  stringify: [Function],
  stringifySync: [Function] }
coffee>
(^C again to quit)
coffee>

When using 2.0.0:

dogan@DOGAN-PC D:\Projects\Node\projectname
$ npm install cson@2.0.0
-
> safefs@3.1.3 preinstall D:\Projects\Node\projectname\node_modules\cson\node_modules\safefs
> node ./cyclic.js

cson@2.0.0 node_modules\cson
├── requirefresh@1.1.2
├── safefs@3.1.3 (graceful-fs@3.0.6)
└── cson-parser@1.0.9 (coffee-script@1.9.0)

dogan@DOGAN-PC D:\Projects\Node\projectname
$ coffee
coffee> require 'cson'
{}
coffee>
(^C again to quit)
coffee>

When using 3.0.1:

dogan@DOGAN-PC D:\Projects\Node\projectname
$ npm install cson@3.0.1
|

> safefs@3.1.3 preinstall D:\Projects\Node\projectname\node_modules\cson\node_modules\safefs
> node ./cyclic.js

/

> typechecker@2.0.8 preinstall D:\Projects\Node\projectname\node_modules\cson\node_modules\extract-opts\node_modules\typechecker
> node ./cyclic.js

cson@3.0.1 node_modules\cson
├── requirefresh@2.0.0
├── cson-parser@1.0.9 (coffee-script@1.9.0)
├── extract-opts@3.0.1 (typechecker@2.0.8)
└── safefs@3.1.3 (graceful-fs@3.0.6)

dogan@DOGAN-PC D:\Projects\Node\projectname
$ coffee
coffee> require 'cson'
{}
coffee>
(^C again to quit)
coffee>
balupton commented 9 years ago

What's the CSON file that you are testing?

balupton commented 7 years ago

The reason I ask is this is probably https://github.com/bevry/cson/issues/78 in disguise

dogancelik commented 7 years ago

No file, I was just trying to load cson module.

Edit: I checked again. The functions are hidden but they are there. e.g. I can access require('cson').parseFile and it returns [Function]

I don't remember if I could access functions before but it works now.

balupton commented 7 years ago

okie, thanks for the update