A collaborative newsroom documentation site, powered by Google Docs.

Overview

Library Build Status Supported node versions

A collaborative newsroom documentation site, powered by Google Docs.

Table of Contents

Demo Site & User Guide

Documentation about how to get started with Library is hosted as a working (read only) demo on Heroku. Consult the site for more detailed instructions than this readme about how to get the most out of Library: https://nyt-library-demo.herokuapp.com.

Contacting us

Love Library? Let us know by joining our Google Group and dropping us a line. You'll also stay up to date with the latest Library features via our release notes, which get sent to this list.

Community

Here are some of the organizations using Library so far.

Marketplace

The New York Times

Northwestern University Knight Lab

Star Tribune

WBEZ

The Los Angeles Times Data and Graphics Department

Contributing

See CONTRIBUTING.md for information on how to contribute code and/or documentation on GitHub or on the demo site.

Questions

If you have questions about how to get your copy of Library up and running, join our Google Group, and let us know what you're running into. We also keep an eye on the #proj-library channel in the News Nerdery Slack. We'll do our best to answer your questions.

Development Workflow

  1. Clone and cd into the repo:

    git clone [email protected]:nytimes/library.git && cd library

  2. From the Google API console, create or select a project, then create a service account with the Cloud Datastore User role. It should have API access to Drive and Cloud Datastore. Store these credentials in server/.auth.json.

    • To use oAuth, you will also need to create oAuth credentials.
    • To use the Cloud Datastore API for reading history, you will need to add in your GCP_PROJECT_ID.
  3. Install dependencies:

    npm install --no-optional

  4. Create a .env file at the project root. An example .env might look like

# node environment (development or production)
NODE_ENV=development
# Google oAuth credentials
GOOGLE_CLIENT_ID=123456-abcdefg.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=abcxyz12345
GCP_PROJECT_ID=library-demo-1234
# comma separated list of approved access domains or email addresses (regex is supported).
APPROVED_DOMAINS="nytimes.com,dailypennsylvanian.com,(.*)?ar.org,[email protected]"
SESSION_SECRET=supersecretvalue

# Google drive Configuration
# team or folder ("folder" if using a folder instead of a team drive)
DRIVE_TYPE=team
# the ID of your team's drive or shared folder. The string of random numbers and letters at the end of your team drive or folder url.
DRIVE_ID=0123456ABCDEF

Make sure to not put any comments in the same line as DRIVE_TYPE and DRIVE_ID vars.

Ensure you share your base drive or folder with the email address associated with the service account created in step 2.

Be careful! Setting NODE_ENV to development changes the built in behaviors for site authentication to allow accounts other than those in the APPROVED_DOMAINS list. Never use NODE_ENV=development for your deployed site, only locally.

  1. Start the app:

    npm run watch

The app should now be running at localhost:3000. Note that Library requires Node v8 or higher.

Tests

You can run functional and unit tests, which test HTML parsing and routing logic, with npm test. A coverage report can be generated by running npm run test:cover.

The HTML parsing tests are based on the Supported Formats doc. To download a fresh copy of the HTML after making edits, run node test/utils/updateSupportedFormats.js.

Customization

Styles, text, caching logic, and middleware can be customized to match the branding of your organization. This is covered in the customization readme.

A sample customization repo is provided at nytimes/library-customization-example.

Deploying the app

Wherever you deploy Library, you'll likely want to set up a Google service account and OAuth 2.0 client Set up your service account with API access to Drive and Cloud Datastore.

If you wish to deploy Library with customizations, create a git repo with the files you would like to include. Set the CUSTOMIZATION_GIT_REPO environment variable to the cloning URL. Files in the repo and packages specified in the package.json will be included in your library installation.

For more detailed instructions, consult the Getting Started section of the demo site: https://nyt-library-demo.herokuapp.com/get-started

Using Heroku

This button can quickly deploy to Heroku: Deploy

Set your app's GOOGLE_APPLICATION_JSON, GOOGLE_CLIENT_ID, and GOOGLE_CLIENT_SECRET with values from the service account and Oauth client. Add .com as an authorized domain in the general OAuth consent screen setup and then add http:// .com/auth/redirect as the callback url in the OAuth credential setup itself.

Using Google App Engine

You can also deploy Library to GAE, using the included app.yaml. Note that you will need to enable billing on your GCP project in order to use Google App Engine. More detailed instructions are provided on the demo site.

Using Docker Dockerhub

Library can be used as a base image for deployment using Docker. This allows you to automate building and deploying a custom version of Library during Docker's build phase. If you create a repo with the contents of your custom folder, you could deploy library from that repo with a Dockerfile like the following:

FROM nytimes/library

# copy custom files to library's custom repo
COPY . ./custom/

# move to a temporary folder install custom npm packages
WORKDIR /usr/src/tmp
COPY package*.json .npmrc ./
RUN npm i
# copy node modules required by custom node modules
RUN yes | cp -rf ./node_modules/* /usr/src/app/node_modules

# return to app directory and build
WORKDIR /usr/src/app
RUN npm run build

# start app
CMD [ "npm", "start" ]

Standard Deployment

Library is a standard node app, so it can be deployed just about anywhere. If you are looking to deploy to a standard VPS, Digital Ocean's tutorials are a great resource.

App structure

Server

The main entry point to the app is index.js.

This file contains the express server which will respond to requests for docs in the configured team drive or shared folder. Additionally, it contains logic about issuing 404s and selecting the template to use based on the path.

Views

Views (layouts) are located in the layouts folder. They use the .ejs extension, which uses a syntax similar to underscore templates.

Base styles for the views are in the styles directory containing Sass files. These files are compiled to CSS and placed in public/css.

Doc parsing

Doc HTML fetch and parsing is handled by docs.js. fetchDoc takes the ID of a Google doc and a callback, then passes the HTML of the document into the callback once it has been downloaded and processed.

Listing the drive

Traversing the contents of the NYT Docs folder is handled by list.js. There are two exported functions:

  • getTree is an async call that returns a nested hash (tree) of Google Drive Folder IDs mapped to their children. It is used by the server to determine whether a route is valid or not.

  • getMeta synchronously returns a hash of Google Doc IDs to metadata objects that were saved in the course of populating the tree. This metadata includes edit history, document authors, and parent folders.

The tree and file metadata are repopulated into memory on an interval (currently 60s). Calling getTree multiple times will not return fresher data.

Auth

Authentication with the Google Drive v3 api is handled by the auth.js file, which exposes a single method getAuth. getAuth will either return an already instantiated authentication client or produce a fresh one. Calling getAuth multiple times will not produce a new authentication client if the credentials have expired; we should build this into the auth.js file later to automatically refresh the credentials on some sort of interval to prevent them from expiring.

User Authentication

Library currently supports both Slack and Google Oauth methods. As Library sites are usually intended to be internal to a set of limited users, Oauth with your organization is strongly encouraged. To use Slack Oauth, specify your Oauth strategy in your .env file, like so:

# Slack needs to be capitalized as per the Passport.js slack oauth docs http://www.passportjs.org/packages/passport-slack-oauth2/
OAUTH_STRATEGY=Slack

You will need to provide Slack credentials, which you can do by creating a Library Oauth app in your Slack workspace. After creating the app, save the app's CLIENT_ID and CLIENT_SECRET in your .env file:

SLACK_CLIENT_ID=1234567890abcdefg
SLACK_CLIENT_SECRET=09876544321qwerty

You will need to add a callback URL to your Slack app to allow Slack to redirect back to your Library instance after the user is authenticated.

Comments
  • Error'd link with really long, suggestion-only document

    Error'd link with really long, suggestion-only document

    Context (Environment)

    • Heroku deploy
    • Node 10
    • folder type drive
    • NODE_ENV=development on Heroku, so that no need for auth

    πŸ”— Website: https://coronavirustechhandbook-demo.herokuapp.com/ πŸ”’ Code: https://github.com/patcon/library-coronavirustechhandbook (no changes) πŸ“‚ Folder: https://drive.google.com/drive/folders/1EKzx34ZiyMh-3V9LoyrO3Q0SiyyAhJmE

    Expected & Actual Behavior

    The deploy works fine for every world-editable doc.

    I then added a suggestion-only doc ("Doctors", and it's unable to detect it -- it fails to show up on "View All" page with the rest.

    When I create a copy of that doc to troubleshoot ("Copy of Doctors"), it does show up in the index, but on clicking, it gives a 500 error, and shows this message in logs:

    2020-03-19T23:26:54.511595+00:00 app[web.1]: info: GET /medicine-care/copy-of-doctors
    2020-03-19T23:26:54.962382+00:00 app[web.1]: debug: updating tree...
    2020-03-19T23:26:54.962784+00:00 app[web.1]: debug: searching for files > 0
    2020-03-19T23:26:56.100738+00:00 heroku[router]: at=info method=GET path="/medicine-care/copy-of-doctors" host=coronavirustechhandbook-demo.herokuapp.com request_id=f868d030-75c9-4107-b8bf-91e0d77a0635 fwd="72.137.70.22" dyno=web.1 connect=1ms service=1594ms status=500 bytes=33839 protocol=https
    2020-03-19T23:26:56.094799+00:00 app[web.1]: error: Serving an error page for /medicine-care/copy-of-doctors
    2020-03-19T23:26:56.094813+00:00 app[web.1]: { message: 'Cannot read property \'displayName\' of undefined',
    2020-03-19T23:26:56.094814+00:00 app[web.1]: stack:
    2020-03-19T23:26:56.094817+00:00 app[web.1]: 'TypeError: Cannot read property \'displayName\' of undefined\n    at Object.exports.getProcessedDocAttributes (/app/server/formatter.js:235:52)\n    at exports.fetchDoc (/app/server/docs.js:44:57)\n    at process._tickCallback (internal/process/next_tick.js:68:7)' }
    2020-03-19T23:26:56.126723+00:00 app[web.1]: debug: searching for files > 12
    2020-03-19T23:26:56.509352+00:00 app[web.1]: debug: Current file count in drive: 36
    2020-03-19T23:26:56.509471+00:00 app[web.1]: debug: tree updated.
    

    Here's my scrubbed .env file: https://gist.github.com/patcon/238c9b960806e55c5e905bd576a85842

    It's confusing in that creating a copy doesn't resolve it, and seems to introduce a different edge-case, that's unclear in its relation! ;)

    Possible remedies:

    • [x] creating a copy of file
    • [x] renaming file
    • [x] wholesale copying contents into new file and starting over ("Copy-paste of Doctors") (didn't work)
    • [x] shortening document (didn't work)

    This is admittedly a really long document (22 pages), so maybe that's an issue.

    bug 
    opened by patcon 14
  • Getting

    Getting "Uh oh, that's a 500" - new installation on GCP

    Context (Environment)

    I've followed the instructions to install Library on GCP. It seemed to all go ok. It's pointing to a Shared Drive on google drive. in .env I put ... DRIVE_TYPE=folder DRIVE_ID= < the long ID in the URL when I go to the shared folder in a browser >

    I've anonymized this, but here's how the .env looks ...

    image

    Expected Behavior

    When I go to the URL for my library site I was expecting to see the site load up much like the one in the instructions/demo.

    Actual Behavior

    I see the site load but it just says "Uh oh, that's a 500"

    image

    I'm not very familiar with GCP, so I don't know where to get logs.

    image

    To Reproduce

    nothing to add here

    Additional Information

    none

    Possible Solution

    I see isaacwhite's note on here https://github.com/nytimes/library/issues/63 and it sounds like I might have that problem. My shared drive was empty, but I added a single doc file now. It still shows the 500 error. Also, that post mentions labelling. I don't know what this means. If it's important, it could be my problem.

    thank you.

    question 
    opened by tomcoombs 8
  • Trying to get the project running

    Trying to get the project running

    Hello! πŸ‘‹

    I'm an engineer on the documentation team at GitHub. My colleague @sarahs and I have been watching this project for a while, and now I'm finally trying it out.

    I've got this set up:

    • [x] App is running on Node.js 10, macOS
    • [x] Created a Google API project with Drive and Cloud Store access
    • [x] Created a service account
    • [x] Created server/.auth.json with credentials file created by Google
    • [x] Created OAuth 2 client id
    • [x] Created .env with all values
    • [x] Created a new folder in Drive using my personal Google account and updated related values in .env
    • [x] Created a new Google Doc in that folder with some filler content

    Unfortunately, I'm still seeing a lot of errors in my console. I added them to a gist here: https://gist.github.com/zeke/c2572650c5211985b33aa42106f1ec02

    Some highlights from that output:

    • 'Cannot find module '/Users/z/git/forks/library/custom/cache/store'
    • warn: GOOGLE_APPLICATION_CREDENTIALS was undefined, using default ./.auth.json credentials file...
    • Cannot find module \'/Users/z/git/forks/library/custom/userAuth\''
    • Cannot find module \'/Users/z/git/forks/library/custom/csp\

    Context (Environment)

    $ node --version
    v10.16.2
    
    $ uname -a
    Darwin calvisitor-10-105-181-69.calvisitor.1918.berkeley.edu 18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64
    

    Expected Behavior

    When running npm run watch, I expect to see a local running server.

    Actual Behavior

    I see a bunch of errors: https://gist.github.com/zeke/c2572650c5211985b33aa42106f1ec02

    To Reproduce

    Follow the checklist above. :)

    Possible Solution

    It looks like there are some undocumented expectations in the code about certain local files that need to exist.

    Maybe the Google App doesn't have access to the Google Drive folder I created?

    I'd be happy to jump on a video call with someone to pair on this. Once I've got a successfully running installation of library I'd be happy to follow up with updates to the documentation to make the setup process more clear for newcomers.

    Thanks for reading!

    question 
    opened by zeke 8
  • Feature/img modal

    Feature/img modal

    Description of Change

    This PR adds an image modal/dialog that allows images to be clicked on and expanded within the modal. Style and functionality is similar to the NYT image expansion modal like the one here. I got permission from the internal team for use of the svgs for expand/collapse since copied straight from the NYT image modal.

    Features:

    1. adds overlay to image that shows expandIcon on img hover as a visible indication that the image can be expanded
    2. adds cursor to images on hover, for the same reason as above
    3. img overlay and modal html are added during server side processing so that they're easier to change together
    4. scrolling up or down on the page while the modal is open closes the modal
    5. svg expand/collapse icons minfied with svgo

    Here's a preview

    Screen Shot 2021-08-05 at 2 25 54 PM Screen Shot 2021-08-05 at 2 26 10 PM

    Related Issue

    https://github.com/nytimes/library/issues/268

    Motivation and Context

    At the moment, all images are constrained to a max-width of ~560px. This makes some high-res images difficult to read. Allowing an image modal makes some images easer to see.

    Checklist

    • [x] Ran npm run lint and updated code style accordingly
    • [x] npm run test passes
    • [x] PR has a description and all contributors/stakeholder are noted/cc'ed
    • [x] tests are updated and/or added to cover new code
    • [x] relevant documentation is changed and/or added

    I'll clean up the commit history once any issues have been worked through.

    opened by xvandish 7
  • Adds max height to children container

    Adds max height to children container

    What is this?

    Connected to #47 Adds max height to children container that lists the contents of folders and adds a permanent scrollbar to show overflow.

    Screen Shot 2019-07-17 at 5 11 17 PM
    opened by jdk27 7
  • Fix line number width bug and add syntax highlighting

    Fix line number width bug and add syntax highlighting

    Description of Change

    Fixes the line number width bug identified in #159, and adds support for hightlight.js for syntax highlighting. ~The highlight.js bundle and default languages adds about 40kB total gzipped, but they're all marked deferred, and so shouldn't interfere with page load time.~

    This runs highlight.js on the backend, so the only new asset that needs to be loaded on the frontend is the highlight.js CSS, which is a few hundred bytes.

    Related Issue

    Motivation and Context

    See #159 for line numbering context. Here's how this looks with fixed line numbers and syntax highlighting:

    Screen Shot 2020-06-23 at 12 23 17 PM

    Checklist

    • [x] Ran npm run lint and updated code style accordingly
    • [x] npm run test passes
    • [x] PR has a description and all contributors/stakeholder are noted/cc'ed
    • [x] tests are updated and/or added to cover new code
    • [ ] relevant documentation is changed and/or added
    opened by SMores 6
  • Serve inline assets on error pages (fixes #3)

    Serve inline assets on error pages (fixes #3)

    Description of Change

    On error pages, serve inline styles and images instead of linking to external files.

    Related Issue

    See #3: Because asset requests are authenticated, the views that handle auth errors render without any styles or images.

    Motivation and Context

    Instead of disabling auth for asset requests (#22), this is an attempt to implement @isaacwhite's more security-conscious proposal. I ran into a few complications while working on this, which I'll document below:

    1. We've removed JS from error pages, but the user-tools dropdown requires JS to function. I worked around this by hiding .user-tools via CSS, but we could also explore conditionally not rendering it in the template, or inlining whatever JS that dropdown requires. (And actually, error pages are still loading jQuery from Cloudfare, because some of the footer code depends on it.)

    2. I'm using custom sass functions to generate base64 data URLs and to read from config/strings.yaml. The node-sass docs warn that custom functions are experimental and should be used with caution, but they seem to be working well here. As an alternative, I explored handling the base64-encoding on boot in the server code, instead of on build via node-sass. This approach worked too, but it seems better to do this work on build.

    3. We could probably cut more CSS from the error styles, but I think it would require either splitting up _furniture.scss into separate partials, or not including that partial at all but duplicating a fair bit of the code from it. Is this worth exploring further? I wanted to check in before I tried, because I don't know whether we can split up core partials without breaking people's customizations.

    Checklist

    • [x] Ran npm run lint and updated code style accordingly ESLint passes for all new code, but there was an existing error in server/docs that I haven't tried to fix.
    • [x] npm run test passes
    • [x] PR has a description and all contributors/stakeholder are noted/cc'ed
    • [x] tests are updated and/or added to cover new code
    • [ ] ~relevant documentation is changed and/or added~
    opened by chrisfrank 6
  • Add JSON responses

    Add JSON responses

    Description of Change

    Return HTML or JSON , with the format chosen to match the request accept header.

    Additionally, rewrite requests with URLs that end in ".json" to their equivalent document without an extensnion but with the appropriate accept header to receive a JSON response.

    Motivation and Context

    I'd like to embed content from a Library instance in another product. Library is under active use and a different group of people manages its content than the team responsible for the product into which the Library content will be embedded. For maintainability, it's preferable to fetch that content from Library on the fly, and not be subject to the templating in Library.

    Checklist

    • [X] Ran npm run lint and updated code style accordingly
    • [X] npm run test passes
    • [X] PR has a description and all contributors/stakeholder are noted/cc'ed
    • [x] tests are updated and/or added to cover new code
    • [ ] relevant documentation is changed and/or added
    opened by tilgovi 5
  • Serve asynchronously compiled inline assets on error pages

    Serve asynchronously compiled inline assets on error pages

    Description of Change

    On error pages, serve inline styles and images instead of linking to external files.

    Related Issue

    Fixes #3.

    Motivation and Context

    We experimented with a synchronous implementation of this in #29, but it complicates the build process. This implementation inlines assets asynchronously on the first error page request, and on subsequent requests serves the compiled assets from memory.

    Checklist

    • [x] Ran npm run lint and updated code style accordingly
    • [x] npm run test passes
    • [x] PR has a description and all contributors/stakeholder are noted/cc'ed
    • [x] tests are updated and/or added to cover new code
    • [x] relevant documentation is changed and/or added
    opened by chrisfrank 5
  • Preserve deep links into Google docs

    Preserve deep links into Google docs

    Description of Change

    Check if a link to a Google document (docs.google.com) contains a deep link to a specific sub-section (heading). If so, append the deep link to the document url.

    Related Issue

    #24

    Motivation and Context

    As @abstrctn (πŸ‘‹!) noted in his issue, a link to a specific heading in a Google doc is currently stripped from the link added to the Library page, so the user is directed to the Google doc generally instead of the specified heading in that document.

    Checklist

    • [x] Ran npm run lint and updated code style accordingly
    • [x] npm run test passes
    • [X] PR has a description and all contributors/stakeholder are noted/cc'ed ~- [ ] tests are updated and/or added to cover new code~ ~- [ ] relevant documentation is changed and/or added~
    opened by maxine 5
  • Support a folder inside Team Drive

    Support a folder inside Team Drive

    Description of Change

    Minor fix to make a Folder inside a Team Drive work as the DRIVE_ID.

    Related Issue

    In #270 I was wondering whether this is a supported scenario.

    Motivation and Context

    For completeness' sake - if a Folder is supported as the root, there's no reason not to support a folder inside a Team Drive as well.

    Checklist

    • [x] Ran npm run lint and updated code style accordingly
    • [x] npm run test passes

    Note: something wrong with docs.test.js on my machine, even in the main branch:

     FAIL  test/unit/docs.test.js
      ● Test suite failed to run
    
        Call retries were exceeded
    
    • [x] PR has a description and all contributors/stakeholder are noted/cc'ed
    • [x] tests are updated and/or added to cover new code

    Note: did not find a related test case to this functionality. I did, however, test manually that all these scenarios work

    1. Team drive as root
    2. Folder inside Team drive as root
    3. Folder inside a personal drive as root
    • [x] relevant documentation is changed and/or added

    Note: Didn't find related documentation to change

    opened by raimohanska 4
  • Support arbitrary path prefix

    Support arbitrary path prefix

    Description of Change

    Library currently expects to be hosted at the root of its domain. However, it can be valuable to host it at a subpath (e.g. mydomain.org/library).

    This PR introduces a new environment variable, PATH_PREFIX, which defaults to '/', and formats all internal URLs with that path prefix.

    In order to pipe the environment variable through everywhere it needed to go, I had to touch almost every file. If it turns out that there's a cleaner way to do this, please let me know!

    This feature is being used live for the NYT Tech Guild's Library site.

    This PR also bumps Library up to Node 16; it's currently configured for 10, which is unsupported!

    Checklist

    • [x] Ran npm run lint and updated code style accordingly
    • [x] npm run test passes
    • [x] PR has a description and all contributors/stakeholder are noted/cc'ed
    • [ ] tests are updated and/or added to cover new code
    • [ ] relevant documentation is changed and/or added
    opened by SMores 0
  • Bump express from 4.17.1 to 4.17.3

    Bump express from 4.17.1 to 4.17.3

    Bumps express from 4.17.1 to 4.17.3.

    Release notes

    Sourced from express's releases.

    4.17.3

    4.17.2

    Changelog

    Sourced from express's changelog.

    4.17.3 / 2022-02-16

    4.17.2 / 2021-12-16

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3

    Bump qs from 6.5.2 to 6.5.3

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump moment from 2.27.0 to 2.29.4

    Bump moment from 2.27.0 to 2.29.4

    Bumps moment from 2.27.0 to 2.29.4.

    Changelog

    Sourced from moment's changelog.

    2.29.4

    • Release Jul 6, 2022
      • #6015 [bugfix] Fix ReDoS in preprocessRFC2822 regex

    2.29.3 Full changelog

    • Release Apr 17, 2022
      • #5995 [bugfix] Remove const usage
      • #5990 misc: fix advisory link

    2.29.2 See full changelog

    • Release Apr 3 2022

    Address https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4

    2.29.1 See full changelog

    • Release Oct 6, 2020

    Updated deprecation message, bugfix in hi locale

    2.29.0 See full changelog

    • Release Sept 22, 2020

    New locales (es-mx, bn-bd). Minor bugfixes and locale improvements. More tests. Moment is in maintenance mode. Read more at this link: https://momentjs.com/docs/#/-project-status/

    2.28.0 See full changelog

    • Release Sept 13, 2020

    Fix bug where .format() modifies original instance, and locale updates

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump node-fetch from 2.6.1 to 2.6.7

    Bump node-fetch from 2.6.1 to 2.6.7

    Bumps node-fetch from 2.6.1 to 2.6.7.

    Release notes

    Sourced from node-fetch's releases.

    v2.6.7

    Security patch release

    Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th party host while a redirect occurred

    What's Changed

    Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7

    v2.6.6

    What's Changed

    Full Changelog: https://github.com/node-fetch/node-fetch/compare/v2.6.5...v2.6.6

    v2.6.2

    fixed main path in package.json

    Commits
    • 1ef4b56 backport of #1449 (#1453)
    • 8fe5c4e 2.x: Specify encoding as an optional peer dependency in package.json (#1310)
    • f56b0c6 fix(URL): prefer built in URL version when available and fallback to whatwg (...
    • b5417ae fix: import whatwg-url in a way compatible with ESM Node (#1303)
    • 18193c5 fix v2.6.3 that did not sending query params (#1301)
    • ace7536 fix: properly encode url with unicode characters (#1291)
    • 152214c Fix(package.json): Corrected main file path in package.json (#1274)
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by endless, a new releaser for node-fetch since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v1.4.2)
  • v1.4.2(Nov 1, 2021)

    What's Changed

    Features and Enhancements

    • Allow copying of assets from custom repo by @nzben in https://github.com/nytimes/library/pull/293
    • Support diacritics in slug by @hopefourie-nyt in https://github.com/nytimes/library/pull/292
    • Update install_customizations to prevent warnings by @leranjun in https://github.com/nytimes/library/pull/295

    Bug Fixes πŸ›

    • Image modal fixes by @xvandish in https://github.com/nytimes/library/pull/299
    • Change order of code block formatting to prevent removal of backticks by @mtandre in https://github.com/nytimes/library/pull/301

    New Contributors

    • @nzben made their first contribution in https://github.com/nytimes/library/pull/293
    • @hopefourie-nyt made their first contribution in https://github.com/nytimes/library/pull/292
    • @leranjun made their first contribution in https://github.com/nytimes/library/pull/295
    • @mtandre made their first contribution in https://github.com/nytimes/library/pull/301

    Full Changelog: https://github.com/nytimes/library/compare/v1.4.1...v1.4.2

    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Aug 17, 2021)

  • v1.4.0(Aug 16, 2021)

    This release contains a number of new features, security updates, bug fixes, and changes to our CI pipeline.

    Feature highlights include Slack OAuth support, JSON response endpoints, and expandable images.

    Breaking Changes ⚠️

    • Library no longer supports Node 8.x. If you are running Library in an environment with an older version of Node, please consider updating to one of the actively maintained Node releases.

    Bug fixes πŸ›

    • Check for language existence before trying to highlight code (#226, πŸ™Œ @SMores)
    • Adjust code block regex (#237, πŸ™Œ @isaacwhite)
    • Folders inside a team drive are now supported in addition to "standalone" folders (#278, πŸ™Œ @raimohanska)

    Features and Enhancements

    • Bring back some advanced customization options (#200, πŸ™Œ @isaacwhite)
    • Remove md5 dependency, use Crypto instead (#248, πŸ™Œ @afischer)
    • Support for Slack OAuth (#245, πŸ™Œ @penina-nyt)
    • Add JSON responses to most endpoints for programatic access (#250, πŸ™Œ @tilgovi @SMores)
    • Add image modals that expand image on click (#283, πŸ™Œ @xvandish)

    CI Updates

    • Our CI pipeline has been moved from CircleCI to Drone Cloud. The pipeline now builds and deploys Docker images to Dockerhub when a new release is tagged. Special thanks to @penina-nyt and @isaacwhite for this work!
    • Update testing pipeline to include Node 14.x and 16.x.

    Security Updates

    • A number of packages have been updated and patched to newer, more secure versions.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Jul 27, 2020)

    • Revamps caching logic. πŸ™Œ , @afischer and @shawn620!
    • Adds syntax highlighting for code blocks. πŸ™Œ , @SMores !
    • Inlines styles for error pages. πŸ™Œ , @chrisfrank!
    • Adds a new environment variable to support https offloading. πŸ™Œ , @salexpdx!
    • Build in support for youtube embeds. πŸ™Œ , @shawn620!
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Oct 10, 2019)

    • Adds autocompleted filenames to Library search. πŸ™Œ, @afischer!
    • Adds the ability use specific emails and regex to the default authentication middleware. πŸ™Œ, @maxine!
    • Updates the markup generated for code snippets to use <code/> blocks. πŸ™Œ, @abstrctn!

    Changelog

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Aug 5, 2019)

    • Preserves deep links (via #heading links) from Google Docs that are part of Library. πŸ™Œ, @maxine!
    • Adds the ability to template the homepage modules by tag and description. Via @isaacwhite.
    • Simplify running the app locally so that npm run watch always builds first. πŸ™Œ, @davegonzalez!
    • Adds a warning when multiple documents or folders resolve to the same path in Library. πŸ™Œ, @jonpo!
    • Adds a max height (400px) to folders on the View all Docs page, useful for larger Library sites. πŸ™Œ, @jdk27!

    Also includes minor updates via npm audit fix and others.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.3(May 6, 2019)

    Fixes a few minor bugs

    • Hides hidden children of non-hidden folders (#20) on the "View all" page, πŸ™Œ to @jptomanelli
    • Resolves an issue where paging through shared folders would fail (#16), πŸ™Œ to @nick-nz
    Source code(tar.gz)
    Source code(zip)
ESDoc - Good Documentation for JavaScript

ESDoc ESDoc is a documentation generator for JavaScript. Please try it out! Features Generates good documentation. Measures documentation coverage. In

ESDoc 2.7k Dec 29, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 2, 2023
:book: documentation for modern JavaScript

The documentation system for modern JavaScript ?? Current maintenance status Supports modern JavaScript: ES5, ES2017, JSX, Vue and Flow type annotatio

null 5.6k Jan 4, 2023
Pointers to useful, well-written, and otherwise beautiful documentation.

DO YOU WANT TO BUILD AND WRITE GLORIOUS TECHNICAL DOCUMENTATION FULL TIME? EMAIL [email protected]. WE NEED YOU. Beautiful Docs I love documentation. If

Mark Phillips 7.9k Jan 4, 2023
YUI Javascript Documentation Tool

YUIDoc YUI's JavaScript Documentation engine. Overview YUIDoc is a Node.js application used at build time to generate API documentation for JavaScript

YUI Library 889 Dec 25, 2022
dexy 2.2 1.9 L4 Python is a free-form literate documentation tool for writing any kind of technical document incorporating code.

Dexy Dexy is open source automation software with features especially designed for documentation and reporting. More information at http://dexy.it Doc

null 304 Sep 30, 2022
Adaptation of the popular mkdocs-material material design theme to the sphinx documentation system

Sphinx-Immaterial Theme This theme is an adaptation of the popular mkdocs-material theme for the Sphinx documentation tool. This theme is regularly ma

Jeremy Maitin-Shepard 89 Jan 4, 2023
A documentation bot built using slash-create for its documentation, functionality derived from Eris Docs bot.

docs-bot A service that handles navigation of a docgen project manifest. Commands All arguments are required. $ npx slash-up list /docs - Search docu

/create 4 Dec 15, 2022
docs: Repository for OSS Docs

Kubeslice Documentation This project repository contains the documentation for Kubeslice. We are so glad that you want to contribute! Prerequisites To

kubeslice 26 Jan 3, 2023
A Svelte template built with newsroom CMS's in mind

A Svelte starter template built with newsroom CMS's in mind. Dynamically create inline graphics based on the placement of figure elements with defined data-chart attributes.

Sawyer Click 15 Dec 30, 2022
A collaborative Whiteboard powered by the [matrix] protocol and infrastucture.

TheBoard A collaborative Whiteboard powered by the [Matrix] protocol and infrastructure. Table of Content: Introduction DISCLAIMER How this project ca

Timo 391 Dec 23, 2022
The missing CLI for beautiful, interactive API docs powered by with Stoplight Elements

Elements CLI The missing CLI for beautiful, interactive API docs powered by with Stoplight Elements Installation Install using npm as global package:

skriptfabrik GmbH 6 Nov 22, 2022
PHEX, but it shows up as Google Docs in the extensions. Useful if you're using it in class.

PHEX, but it shows up as Google Docs in the extensions. Useful if you're using it in class.

gemsvidΓΈ 3 Oct 28, 2022
Example implementation of having Google-Docs like comments

lexical-comments Example implementation of having Google-Docs like comments in https://lexical.dev . Main ingredient that makes this possible is Comme

Jeet Mandaliya 21 Dec 24, 2022
Blog template to use Google Docs as article editor.

Godolog Blog template to use Google Docs as article editor. Usage Set up Create a new repository from Use this template button above with Include all

Ryo Nakamura 13 Oct 4, 2022
Simple google docs thing in Remix using socket.io.

This is just a simple google docs thing, me playing around with Remix and sockets. TODO: from socket.io to yjs sockets, support CRDT. Installation Aft

Tiger Abrodi 20 Apr 19, 2022
Google-Drive-Directory-Index | Combining the power of Cloudflare Workers and Google Drive API will allow you to index your Google Drive files on the browser.

?? Google-Drive-Directory-Index Combining the power of Cloudflare Workers and Google Drive will allow you to index your Google Drive files on the brow

Aicirou 127 Jan 2, 2023
A documentation site for the Aries JavaScript ecosystem.

Aries JavaScript Documentation Getting started | Contributing | License Aries JavaScipt is an ecosystem of self-sovereign identity development tools,

Hyperledger 11 Nov 16, 2022
A Very Good Documentation Site created by the Very Good Ventures Team πŸ¦„

Very Good Docs Site Developed with ?? by Very Good Ventures ?? A Very Good Docs Site created by the Very Good Ventures Team. Generated by the Very Goo

Very Good Open Source 8 Nov 2, 2022