File tree Expand file tree Collapse file tree 10 files changed +25
-32
lines changed Expand file tree Collapse file tree 10 files changed +25
-32
lines changed Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff 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 } `
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ function draw() {
99export 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
Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ const mongoConnectionString = process.env.MONGO_URL;
1414const { ObjectId } = mongoose . Types ;
1515// Connect to MongoDB
1616mongoose . Promise = global . Promise ;
17- mongoose . connect ( mongoConnectionString , {
18- useNewUrlParser : true ,
19- useUnifiedTopology : true
20- } ) ;
17+ mongoose . connect ( mongoConnectionString ) ;
2118mongoose . set ( 'strictQuery' , true ) ;
2219mongoose . connection . on ( 'error' , ( ) => {
2320 console . error (
Original file line number Diff line number Diff 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 } ) ;
Original file line number Diff line number Diff line change @@ -59,10 +59,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
5959
6060const mongoConnectionString = process . env . MONGO_URL ;
6161
62- mongoose . connect ( mongoConnectionString , {
63- useNewUrlParser : true ,
64- useUnifiedTopology : true
65- } ) ;
62+ mongoose . connect ( mongoConnectionString ) ;
6663mongoose . set ( 'strictQuery' , true ) ;
6764mongoose . connection . on ( 'error' , ( ) => {
6865 console . error (
Original file line number Diff line number Diff line change @@ -14,10 +14,7 @@ const headers = { 'User-Agent': 'p5js-web-editor/0.0.1' };
1414
1515const mongoConnectionString = process . env . MONGO_URL ;
1616
17- mongoose . connect ( mongoConnectionString , {
18- useNewUrlParser : true ,
19- useUnifiedTopology : true
20- } ) ;
17+ mongoose . connect ( mongoConnectionString ) ;
2118mongoose . set ( 'strictQuery' , true ) ;
2219mongoose . connection . on ( 'error' , ( ) => {
2320 console . error (
Original file line number Diff line number Diff line change @@ -76,14 +76,19 @@ app.use(cookieParser());
7676
7777mongoose . 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
8893app . 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) ;
You can’t perform that action at this time.
0 commit comments