Skip to content

Commit

Permalink
Merge pull request #661 from smapiot/develop
Browse files Browse the repository at this point in the history
Release 1.4.2
  • Loading branch information
FlorianRappl authored Dec 16, 2023
2 parents 3faaddc + 583b2ba commit 2873b7d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 41 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Piral Changelog

## 1.4.2 (tbd)

- Fixed misplaced *index.d.ts* in a scaffolded pilet (#658)
- Fixed issue where `pilet publish` could remove the source folder (#657)
- Updated toggle in debug utilities to always use life cycle (#659)

## 1.4.1 (December 14, 2023)

- Fixed issue with pilet injector for certain apps in monorepos
Expand Down
31 changes: 14 additions & 17 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,17 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: Yarn@2
displayName: Build Core Demo
condition: ne(variables['Build.SourceBranchName'], variables['documentBranch'])
inputs:
Arguments: build:demo-core
- task: Yarn@2
displayName: Build CrossFx Demo
condition: ne(variables['Build.SourceBranchName'], variables['documentBranch'])
inputs:
Arguments: build:demo-cross
- task: Yarn@2
displayName: Build Full Demo
condition: ne(variables['Build.SourceBranchName'], variables['documentBranch'])
inputs:
Arguments: build:demo-full
- task: Yarn@2
Expand Down Expand Up @@ -125,7 +122,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -181,7 +178,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -230,7 +227,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -283,7 +280,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -336,7 +333,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -389,7 +386,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -449,7 +446,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -517,7 +514,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -570,7 +567,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -623,7 +620,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -676,7 +673,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -729,7 +726,7 @@ stages:
- task: Yarn@2
displayName: Assemble Packages
inputs:
Arguments: setup
Arguments: install --ignore-scripts
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
Expand Down Expand Up @@ -821,7 +818,7 @@ stages:
- stage: DeployDemos
displayName: Deploy Demos
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['releaseBranch']))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['documentBranch']))

jobs:
- deployment: DeployCoreDemo
Expand Down
10 changes: 1 addition & 9 deletions src/framework/piral-core/src/tools/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,7 @@ export function integrateDebugger(
removePilet: context.removePilet,
updatePilet(pilet) {
if (!pilet.disabled) {
const { createApi } = options;
const newApi = createApi(pilet);

try {
context.injectPilet(pilet);
pilet.setup(newApi);
} catch (error) {
console.error(error);
}
context.addPilet(pilet);
} else {
context.injectPilet(pilet);
}
Expand Down
6 changes: 0 additions & 6 deletions src/samples/sample-piral/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ const instance = createInstance({
}),
],
requestPilets() {
return Promise.resolve([{
spec: 'mf',
name: '@wmf/foo',
version: '1.0.0',
link: 'http://localhost:8080/index.js',
}]);
return fetch('https://feed.piral.cloud/api/v1/pilet/sample')
.then((res) => res.json())
.then((res) => res.items);
Expand Down
8 changes: 3 additions & 5 deletions src/tooling/piral-cli/src/apps/declaration-pilet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface DeclarationPiletOptions {
target?: string;

/**
* Specifies ff the target d.ts would be overwrwitten.
* Specifies ff the target d.ts would be overwritten.
*/
forceOverwrite?: ForceOverwrite;

Expand Down Expand Up @@ -55,20 +55,18 @@ export async function declarationPilet(baseDir = process.cwd(), options: Declara

for (const item of allEntries) {
const targetDir = dirname(item);
const { peerDependencies, peerModules, root, apps, piletPackage, ignored, importmap, schema } =
await retrievePiletData(targetDir);
const { peerDependencies, peerModules, root, apps, piletPackage, importmap } = await retrievePiletData(targetDir);
const piralInstances = apps.map((m) => m.appPackage.name);
const externals = combinePiletExternals(piralInstances, peerDependencies, peerModules, importmap);
const dest = resolve(root, target);
const outDir = dirname(dest);

await createPiletDeclaration(
piletPackage.name,
piralInstances,
root,
item,
externals,
outDir,
dest,
forceOverwrite,
logLevel,
);
Expand Down
8 changes: 5 additions & 3 deletions src/tooling/piral-cli/src/apps/publish-pilet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,13 @@ async function getFiles(
);
const schemaVersion = originalSchemaVersion || schema || config.schemaVersion || defaultSchemaVersion;
const piralInstances = apps.map((m) => m.appPackage.name);
const { main = 'dist/index.js', name = 'pilet' } = piletPackage;
const defaultOutput = 'dist/index.js';
const { main = defaultOutput, name = 'pilet' } = piletPackage;
const propDest = resolve(root, main);
const propDestDir = dirname(propDest);
log('generalDebug_0003', `Pilet "${name}" is supposed to generate artifact in "${propDest}".`);
const usePropDest = dirname(propDest) !== root && isSubDir(root, propDest);
const dest = usePropDest ? propDest : resolve(root, 'dist');
const usePropDest = propDestDir !== root && propDestDir !== targetDir && isSubDir(root, propDest);
const dest = usePropDest ? propDest : resolve(root, defaultOutput);
log('generalDebug_0003', `Pilet "${name}" is generating artifact in "${dest}".`);
const outDir = dirname(dest);
const outFile = basename(dest);
Expand Down
2 changes: 1 addition & 1 deletion tools/changelog-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (require.main === module) {
if (args.includes('--update')) {
updateChangelogDate();
} else if (args.includes('--apply')) {
execSync(`lerna version ${version} --no-git-tag-version --yes`, {
execSync(`lerna version ${version} --no-git-tag-version --yes --force-publish`, {
cwd,
stdio: 'inherit',
shell: true,
Expand Down

0 comments on commit 2873b7d

Please sign in to comment.