Closed gmaclennan closed 7 years ago
Please feel free to revert to the old source files since the new ones have not been properly tested, and the contributor who made the new source files has not been responsive lately.
This PR will not me merged as-is.
Alternatively, you can take this on: https://github.com/ericelliott/cuid/issues/68
Hi @ericelliott thanks for the info, I understand the previous build process a little better now. I don't have time for #68 right now but I was hoping I could do this in a way that allowed for a patch / minor release without any breaking changes, as a stopgap until #68 is done.
Here's what I have done:
v1.2.5
e3c0c4e9b5c1f02ad692b0efcea592e8754c7f36 which is the latest release where the original source files were still in the repo.dist/
, which are currently the files published on npm in v1.3.8
, have not changed since v1.2.5
.unused: false
jshint option, so I changed that option.package.json
with the latest changes from master, namely:
license
fieldbrowserify
field to browser
dist/
files in this branch.This should enable you to publish a v1.3.9
release to npm from this branch with these fixes for webworkers and serviceWorkers. The changes should not change anything if this code is not run in a webworker or serviceWorker.
To publish from this branch you will need to:
npm run build
package.json
version numbernpm publish
I'm not sure the best way to merge these changes into master / whether it's possible to, given that master currently has a lot of work that has not been published to npm, and a few commits since v1.2.5 have modified the dist/
directly - although those changes were only to comments not the code. I'll have to leave you to decide what to do with that.
Merged into #72
This is a temporary fix to make this work in web workers and service workers.
window
andnavigator.mimeTypes
are undefined in this context. This is quick and dirty but should allow for a minor point release and allow some dependent modules to work.As far as I can see the code that is published on npm in
dist/*-cuid.js
is not built from any other code, and it is not tested. Tests look like they run onsource/*
, and that code is inbuild/*
but that code seems to have a different api and is not published via npm.Therefore I have only changed
dist/browser-cuid.js
and hopefully merging this patch will allow a minor release off master to npm without breaking anything.