@nina-protocol/nina-db 0.0.41 → 0.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,7 +116,8 @@ export default class Release extends Model {
116
116
  .replace(/ +/g, ' ') // remove spaces
117
117
  .replace(/ /g, '-') // replace spaces with hyphens
118
118
  .replace(/[^a-zA-Z0-9-]/g, '') // remove non-alphanumeric characters
119
- .replace(/--+/g, ''); // remove spaces
119
+ .replace(/--+/g, '') // remove spaces
120
+ .replace(/-$/, '');
120
121
  const existingRelease = await Release.query().findOne({ slug });
121
122
  if (existingRelease) {
122
123
  return `${slug}-${randomStringGenerator()}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nina-protocol/nina-db",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "description": "",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -128,6 +128,8 @@ export default class Release extends Model {
128
128
  .replace(/ /g, '-') // replace spaces with hyphens
129
129
  .replace(/[^a-zA-Z0-9-]/g, '') // remove non-alphanumeric characters
130
130
  .replace(/--+/g, '') // remove spaces
131
+ .replace(/-$/, '')
132
+
131
133
  const existingRelease = await Release.query().findOne({ slug });
132
134
  if (existingRelease) {
133
135
  return `${slug}-${randomStringGenerator()}`;