mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Move repo to pnpm based workflow (#14350)
* Use pnpm instead of npm * Setup workspace * Replace scripts / lerna root stuff * Add todo file * Update lock, start updating packages * Update todo * [WIP] Keep going on module resolution in pnpm * Fix final missing deps/types for complete build * [WIP] Replace npm commands with pnpm alternatives * Update jest config for v28 * Fix missing package under schema * Update workflow * Run CI on fork * Use local reference * Remove version from local workflow * Add build to prepare * Add Node's max old space size flag to linter * Idemdito for codeql * Hyphens? Underscores? * Bang * Only build one thing at a time * Underscores after all? * Match 7gb of GH * Set env on prepare * Jest is driving me nuts * Downgrade jest * Add root jest * We'll get there, eventually. * 🥳 * Het houdt niet op, niet vanzelf * attempt to fix e2e * fix unit test & shared import * add `debug: true` to CodeQL action * Fix dev call in shared * Add missing cross-env * Add missing geo-json dependency for app * add flag to prepare action to skip build * remove debug flag from codeql action * fix invalid env syntax * add tslib to app dependencies for tests * another attempt * Added missing rimraf dependency for the api prebuild/cleanup scripts * Added missing ts-node dependency for the api cli script * update E2E tests readme to use pnpm * Undo move of extensions sdk * Fixes nested groups in accordions not rendering fields (#14369) * initial fix for nested groups in accordions * removed debug code * Fix strict relative dates showing "incorrect" (#14390) * Set rounding method of relative formatted date to floor when strict option is selected * Add round fn as an option Co-authored-by: rijkvanzanten <rijkvanzanten@me.com> * Don't use locales in generated camelCased values from env (#14401) Ref https://github.com/directus/directus/discussions/14122 * Fix list panel descending sort (#14396) * fix list panel descending sort * Handle missing or explicit desc value Co-authored-by: rijkvanzanten <rijkvanzanten@me.com> * Fix query primary field for system tables (#14402) * New Crowdin updates (#14403) * Update source file en-US.yaml * New translations en-US.yaml (Spanish, Chile) * New translations en-US.yaml (Spanish, Latin America) * New translations en-US.yaml (Greek) * New translations en-US.yaml (Italian) * New translations en-US.yaml (French, Canada) * Fix/wysiwyg context menu (#14404) * New translations en-US.yaml (Polish) (#14407) * Encoded the url using encodeURIComponent, so that the url gets sanitzed and so, we did not get 404 error. (#14418) * Encoded the url using encodeURIComponent, so that the url gets sanitized and we did not get 404 error. * Added required changes as stated by the reviewer * Used encodeURI instead of encodeURIComponent to encode the params only * Solved linting error * Solved linting errors * checked with npm run lint, no linting errors found * fix generateJoi error due to empty permissions when creating new role (#14416) * fix empty permissions when creating new role * basic test * move logic up * additional test * Update api/tests/utils/filter-items.test.ts Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: ian <licitdev@gmail.com> * Recreate lockfile * Fix build of extensions-sdk * Add missing dependency * Add some more missing deps * Update blackbox to use pnpm * Update workflow to use main * Update pack to work with pnpm * Simplify commands * Remove todo file (completed) * ADd missing types dep * Use local test version * Remove version from local reference * Call super with context * Add missing dep * Simplify workflows Ref https://github.com/directus/organization/issues/135 * Simplify some more * Linter is on root Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Co-authored-by: brainslug <tim@brainslug.nl> Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Gerard Lamusse <gerardlamo@gmail.com> Co-authored-by: José Varela <joselcvarela@gmail.com> Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: Zeel Pathak <60271095+zeel-pathak@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import execa from 'execa';
|
||||
import inquirer from 'inquirer';
|
||||
import { Knex } from 'knex';
|
||||
import ora from 'ora';
|
||||
import { v4 as uuidV4 } from 'uuid';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import Joi from 'joi';
|
||||
import runMigrations from '../../../database/migrations/run';
|
||||
import runSeed from '../../../database/seeds/run';
|
||||
@@ -97,8 +97,8 @@ export default async function init(): Promise<void> {
|
||||
|
||||
firstUser.password = await generateHash(firstUser.password);
|
||||
|
||||
const userID = uuidV4();
|
||||
const roleID = uuidV4();
|
||||
const userID = uuid();
|
||||
const roleID = uuid();
|
||||
|
||||
await db('directus_roles').insert({
|
||||
id: roleID,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Liquid } from 'liquidjs';
|
||||
import { nanoid } from 'nanoid';
|
||||
import path from 'path';
|
||||
import { promisify } from 'util';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { Credentials } from '../create-db-connection';
|
||||
import { drivers } from '../drivers';
|
||||
|
||||
@@ -18,7 +18,7 @@ const liquidEngine = new Liquid({
|
||||
|
||||
const defaults = {
|
||||
security: {
|
||||
KEY: uuidv4(),
|
||||
KEY: uuid(),
|
||||
SECRET: nanoid(32),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { parseJSON, toArray } from '@directus/shared/utils';
|
||||
import { Knex } from 'knex';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.createTable('directus_flows', (table) => {
|
||||
@@ -39,7 +39,7 @@ export async function up(knex: Knex): Promise<void> {
|
||||
const operations = [];
|
||||
|
||||
for (const webhook of webhooks) {
|
||||
const flowID = uuidv4();
|
||||
const flowID = uuid();
|
||||
|
||||
flows.push({
|
||||
id: flowID,
|
||||
@@ -55,7 +55,7 @@ export async function up(knex: Knex): Promise<void> {
|
||||
});
|
||||
|
||||
operations.push({
|
||||
id: uuidv4(),
|
||||
id: uuid(),
|
||||
name: 'Request',
|
||||
key: 'request',
|
||||
type: 'request',
|
||||
|
||||
@@ -80,11 +80,11 @@ export class ImportService {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
stream.pipe(extractJSON);
|
||||
|
||||
extractJSON.on('data', ({ value }) => {
|
||||
extractJSON.on('data', ({ value }: Record<string, any>) => {
|
||||
saveQueue.push(value);
|
||||
});
|
||||
|
||||
extractJSON.on('error', (err) => {
|
||||
extractJSON.on('error', (err: any) => {
|
||||
destroyStream(stream);
|
||||
destroyStream(extractJSON);
|
||||
|
||||
@@ -140,7 +140,7 @@ export class ImportService {
|
||||
|
||||
saveQueue.push(obj);
|
||||
})
|
||||
.on('error', (err) => {
|
||||
.on('error', (err: any) => {
|
||||
destroyStream(stream);
|
||||
reject(new InvalidPayloadException(err.message));
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ import { unflatten } from 'flat';
|
||||
import Joi from 'joi';
|
||||
import { Knex } from 'knex';
|
||||
import { clone, cloneDeep, isNil, isObject, isPlainObject, omit, pick } from 'lodash';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { parse as wktToGeoJSON } from 'wellknown';
|
||||
import getDatabase from '../database';
|
||||
import { getHelpers, Helpers } from '../database/helpers';
|
||||
@@ -59,7 +59,7 @@ export class PayloadService {
|
||||
},
|
||||
async uuid({ action, value }) {
|
||||
if (action === 'create' && !value) {
|
||||
return uuidv4();
|
||||
return uuid();
|
||||
}
|
||||
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user