Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno support #12397

Merged
merged 33 commits into from Nov 28, 2022
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3f79b18
feat: run tests on Deno
vkarpov15 Sep 4, 2022
c1a4823
chore: correct action name
vkarpov15 Sep 4, 2022
52110b6
chore: setup MongoDB server on deno tests
vkarpov15 Sep 4, 2022
8697ce5
chore: correct download path re: #9056
vkarpov15 Sep 4, 2022
32e8055
test: convert #3973 test to async/await to try to work around deno te…
vkarpov15 Sep 5, 2022
f4d8f61
test: ignore deno.js for linter, convert a few more populate tests to…
vkarpov15 Sep 5, 2022
0698d9a
test: print error to debug why #3973 test only fails on Deno in GH wo…
vkarpov15 Sep 5, 2022
356a132
test: print some more errors re: #9056
vkarpov15 Sep 5, 2022
2bcebe0
avoid using elvis operator
vkarpov15 Sep 5, 2022
79fb5b2
test: try cleaning up castNonArrays option to fix Deno tests re: #9056
vkarpov15 Sep 5, 2022
f89f833
test: correctly reset castNonArrays
vkarpov15 Sep 5, 2022
5045b5b
test: skip child_process test in Deno, explicitly exit when tests are…
vkarpov15 Sep 5, 2022
c13f2a6
test: check if #8222 error is caught in Deno re: #9056
vkarpov15 Sep 5, 2022
d6f6ce8
test: temporarily skip strictQuery tests to see if they fix #9056 tes…
vkarpov15 Sep 5, 2022
72124b8
test: increase test timeout in deno and ensure strictQuery is set re:…
vkarpov15 Sep 5, 2022
b3c31f1
test: add back connection and index tests, skip because of dns issue …
vkarpov15 Sep 5, 2022
1fb268e
test: quick test fix re: #9046
vkarpov15 Sep 5, 2022
17e2831
test: correctly clean up model re: #9056
vkarpov15 Sep 5, 2022
80cb49f
Merge branch '6.7' into vkarpov15/deno
vkarpov15 Sep 30, 2022
53db34f
Merge branch '6.7' into vkarpov15/deno
vkarpov15 Oct 3, 2022
66d8cad
test: proof of concept for running Mongoose tests without --unstable
vkarpov15 Oct 3, 2022
cdc824d
chore: test with deno v1.26.x
vkarpov15 Oct 3, 2022
72bf47b
test: add missing test files to deno
vkarpov15 Oct 3, 2022
3fb3ccb
Merge branch '6.7' into vkarpov15/deno
vkarpov15 Oct 5, 2022
759e47d
docs: add deno instructions and badges to README
vkarpov15 Oct 5, 2022
872b9a3
docs: more info on required deno flags
vkarpov15 Oct 5, 2022
bd5e28a
Apply suggestions from code review
Uzlopak Oct 28, 2022
5517fbc
Merge branch '6.8' into vkarpov15/deno
vkarpov15 Nov 28, 2022
566c6e1
Merge branch 'vkarpov15/deno' of github.com:Automattic/mongoose into …
vkarpov15 Nov 28, 2022
e4e26f1
Update README.md
vkarpov15 Nov 28, 2022
0a37232
fix: use deno 1.28 in tests, use --allow-sys, no more --unstable
vkarpov15 Nov 28, 2022
b41f2de
test: clear data between query cursor tests
vkarpov15 Nov 28, 2022
68ec07d
quick note about alpha support for deno
vkarpov15 Nov 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
@@ -1,10 +1,11 @@
# Mongoose

Mongoose is a [MongoDB](https://www.mongodb.org/) object modeling tool designed to work in an asynchronous environment. Mongoose supports both promises and callbacks.
Mongoose is a [MongoDB](https://www.mongodb.org/) object modeling tool designed to work in an asynchronous environment. Mongoose supports [Node.js](https://nodejs.org/en/) and [Deno](https://deno.land/) (beta).

[![Slack Status](https://img.shields.io/badge/slack-mongoosejsteam-34D058.svg?logo=slack )](https://mongoosejsteam.slack.com)
[![Build Status](https://github.com/Automattic/mongoose/workflows/Test/badge.svg)](https://github.com/Automattic/mongoose)
[![NPM version](https://badge.fury.io/js/mongoose.svg)](http://badge.fury.io/js/mongoose)
[![Deno version](https://deno.land/badge/mongoose/version)](https://deno.land/x/mongoose)
[![Deno popularity](https://deno.land/badge/mongoose/popularity)](https://deno.land/x/mongoose)
vkarpov15 marked this conversation as resolved.
Show resolved Hide resolved

[![npm](https://nodei.co/npm/mongoose.png)](https://www.npmjs.com/package/mongoose)

Expand Down Expand Up @@ -45,6 +46,8 @@ First install [Node.js](http://nodejs.org/) and [MongoDB](https://www.mongodb.or
$ npm install mongoose
```

Mongoose 6.7.0 also includes beta support for [Deno](https://deno.land/).
vkarpov15 marked this conversation as resolved.
Show resolved Hide resolved

## Importing

```javascript
Expand All @@ -55,6 +58,15 @@ const mongoose = require('mongoose');
import mongoose from 'mongoose';
```

Or, using [Deno's `createRequire()` for CommonJS support](https://deno.land/std@0.113.0/node/README.md?source=#commonjs-modules-loading) as follows.

```javascript
import { createRequire } from 'https://deno.land/std/node/module.ts';
const require = createRequire(import.meta.url);

const mongoose = require('mongoose');
```

## Mongoose for Enterprise

Available as part of the Tidelift Subscription
Expand Down