Skip to content

Commit 6b4f715

Browse files
committed
Merge branch 'develop' into update-node-version
2 parents 5ace0d4 + e2e62e6 commit 6b4f715

File tree

10 files changed

+25
-32
lines changed

10 files changed

+25
-32
lines changed

client/modules/IDE/components/About.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function About(props) {
6363
</p>
6464
<p className="about__content-column-list">
6565
<a
66-
href="https://p5js.org/learn/"
66+
href="https://p5js.org/tutorials/"
6767
target="_blank"
6868
rel="noopener noreferrer"
6969
>
@@ -164,7 +164,7 @@ function About(props) {
164164
</p>
165165
<p className="about__content-column-list">
166166
<a
167-
href="https://p5js.org/download/support.html"
167+
href="https://p5js.org/donate/"
168168
target="_blank"
169169
rel="noopener noreferrer"
170170
>

client/modules/Preview/previewIndex.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const App = () => {
5555
function addCacheBustingToAssets(files) {
5656
const timestamp = new Date().getTime();
5757
return files.map((file) => {
58-
if (file.url) {
58+
if (file.url && !file.url.endsWith('obj') && !file.url.endsWith('stl')) {
5959
return {
6060
...file,
6161
url: `${file.url}?v=${timestamp}`

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p5.js-web-editor",
3-
"version": "2.14.7",
3+
"version": "2.15.0",
44
"description": "The web editor for p5.js.",
55
"scripts": {
66
"clean": "rimraf dist",

server/domain-objects/createDefaultFiles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ function draw() {
99
export const defaultHTML = `<!DOCTYPE html>
1010
<html lang="en">
1111
<head>
12-
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/p5.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.10.0/addons/p5.sound.min.js"></script>
12+
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.0/p5.js"></script>
13+
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.0/addons/p5.sound.min.js"></script>
1414
<link rel="stylesheet" type="text/css" href="style.css">
1515
<meta charset="utf-8" />
1616

server/migrations/emailConsolidation.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ const mongoConnectionString = process.env.MONGO_URL;
1414
const { ObjectId } = mongoose.Types;
1515
// Connect to MongoDB
1616
mongoose.Promise = global.Promise;
17-
mongoose.connect(mongoConnectionString, {
18-
useNewUrlParser: true,
19-
useUnifiedTopology: true
20-
});
17+
mongoose.connect(mongoConnectionString);
2118
mongoose.set('strictQuery', true);
2219
mongoose.connection.on('error', () => {
2320
console.error(

server/previewServer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ const connectToMongoDB = async () => {
2222
mongoose.set('strictQuery', true);
2323

2424
await mongoose.connect(mongoConnectionString, {
25-
useNewUrlParser: true,
26-
useUnifiedTopology: true,
2725
serverSelectionTimeoutMS: 30000, // 30 seconds timeout
2826
socketTimeoutMS: 45000 // 45 seconds timeout
2927
});

server/scripts/examples-gg-latest.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
5959

6060
const mongoConnectionString = process.env.MONGO_URL;
6161

62-
mongoose.connect(mongoConnectionString, {
63-
useNewUrlParser: true,
64-
useUnifiedTopology: true
65-
});
62+
mongoose.connect(mongoConnectionString);
6663
mongoose.set('strictQuery', true);
6764
mongoose.connection.on('error', () => {
6865
console.error(

server/scripts/examples.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
1414

1515
const mongoConnectionString = process.env.MONGO_URL;
1616

17-
mongoose.connect(mongoConnectionString, {
18-
useNewUrlParser: true,
19-
useUnifiedTopology: true
20-
});
17+
mongoose.connect(mongoConnectionString);
2118
mongoose.set('strictQuery', true);
2219
mongoose.connection.on('error', () => {
2320
console.error(

server/server.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,19 @@ app.use(cookieParser());
7676

7777
mongoose.set('strictQuery', true);
7878

79-
const clientPromise = mongoose
80-
.connect(mongoConnectionString, {
81-
useNewUrlParser: true,
82-
useUnifiedTopology: true,
83-
serverSelectionTimeoutMS: 30000, // 30 seconds timeout
84-
socketTimeoutMS: 45000 // 45 seconds timeout
85-
})
86-
.then((m) => m.connection.getClient());
79+
async function connectToMongoDB() {
80+
try {
81+
const mongooseConnection = await mongoose.connect(mongoConnectionString, {
82+
serverSelectionTimeoutMS: 30000, // 30 seconds timeout
83+
socketTimeoutMS: 45000 // 45 seconds timeout
84+
});
85+
return mongooseConnection.connection.getClient();
86+
} catch (err) {
87+
throw new Error('MongoDB connection failed', err);
88+
}
89+
}
90+
91+
const clientInstancePromise = connectToMongoDB();
8792

8893
app.use(
8994
session({
@@ -97,8 +102,7 @@ app.use(
97102
secure: false
98103
},
99104
store: new MongoStore({
100-
clientPromise,
101-
autoReconnect: true
105+
clientPromise: clientInstancePromise
102106
})
103107
})
104108
);

0 commit comments

Comments
 (0)